Skip to content

Commit 9433f58

Browse files
committed
Merge branch 'master' of github.com:string2string/string2string into HEAD
2 parents bc8f958 + ed1a427 commit 9433f58

File tree

41 files changed

+235
-11116
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+235
-11116
lines changed

LICENSE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The string2string software is available for personal or open source use under the GPLv3 license.
2+
Any closed source distribution or other use against the terms of the GPLv3 license must be within the terms of a commercial license.

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
String2string
2+
=========
3+
4+
Created by [David Katz](https://github.com/katzdave), [Harrison Zhao](https://github.com/harrisonzhao), and [Caleb Zulawski](https://github.com/calebzulawski) at [The Cooper Union](http://cooper.edu).
5+
6+
String2String brings the classic blackboard to the 21st century.
7+
8+
By using strings, pulleys, weights, ultrasonic distance sensing, a radio transmitter, geometry, and some advanced filtering algorithms, we have developed an efficient, non-intrusive and versatile method for encoding a blackboard at a high resolution; all for less than 40 dollars.
9+
10+
You'll have to see it to believe it.
11+
12+
Awards
13+
=====
14+
* [HackCooper 2015](http://hackcooper.org/) most technical hack
15+
* ["Dream it. Code it. Win it." 2015](http://www.dreamitcodeitwinit.org/) Ingenuity Prize
16+
17+
Links
18+
=====
19+
* [Hackathon project profile](https://www.hackerleague.org/hackathons/hackcooper-2015/hacks/string2string)<br>
20+
* [Demo video](https://www.youtube.com/watch?v=y1aw0IiamFM)
21+
22+
Structure of the project
23+
=====
24+
* The arduino code can found in the <b>arduino/sonar</b> folder.<br>
25+
* The program that serializes the sensor data from the arduino into x,y coordinates is found in the <b>client</b> folder.<br>
26+
* The webapp that streams the board data to the website in real time can be found in the <b>webapp</b> folder.
27+
28+
The README.md in each folder will explain how to set up the project.
29+
30+
Technical Details:
31+
=========
32+
A chalk-holder is attached to two strings, each connected over a pulley to a weight. The weights sit in static equilibrium, so they serve the purpose of keeping the string taut without negatively interfering with the writer.
33+
34+
An ultrasonic distance sensor is pointed upward in each tube at the weight. Because the speed of sound is known, by sending an ultrasonic signal, and tracking the time it takes for the signal to hit the weight and return to the transmitter, we can effectively measure the distance from each sensor to its corresponding weight.
35+
36+
With only two calibration points, one at each pulley, we can determine both the board width and all other necessary parameters for position estimation. In other words our algorithm, is generic in that it will work immediately on any similar setup of potentially different size, making this widely applicable to blackboard setups of all types.
37+
38+
The algorithm works by computing the difference between the position of each weight in the current and calibration position, effectively allowing us to accurately measure the distance of the chalk-holder from each pulley. This gives us an approximation of each of the three sides of the string, string, top of board triangle. From there, by applying the law of cosines, we can convert the position of the chalk-holder to x,y coordinates.
39+
40+
Using a wireless radio transmitter attached to a button, writing is only digitized when the button is pressed. A second button exists to erase the current state of the board.
41+
42+
Initially our results were plagued with noise. The smooth path the user took become jagged and crooked. This was because of both noise from the sensors, and a lack of points resulting in sloppy interpolation. We combated this issue on both the backend and the frontend.
43+
44+
On the backend we settled on a Savitsky-Golay Filter. This filter fits successive sub-sets of adjacent data points with a low-degree polynomial by the method of linear least squares. In other words, we take small, overlapping batches of points and create a predictive model of the position of the pen. In doing so, most of the sensor noise is effectively filtered away.
45+
46+
On the frontend we used the method of cardinal splines. This method constructs curves to interpolate between the points based on the same physical properties of flexible rods. We also transmitted points to the frontend with x scaled from 0 to 1 allowing the browser to intelligently scale the image regardless of a user’s computer’s resolution.
47+
48+
In addition to providing a live stream of the board, users have the ability to download a digital copy of notes. Each time the board is reset, the final state of the board is logged in the sidebar for users to download previous states as an image. If only text is written, this images are perfectly suited for optical character recognition.
49+
50+
What makes String2String truly effective though is the cost. Each of our distance sensors, costs only 50 cents. The total estimated cost for all of our materials including pvcpipe, some weights/pulleys, and an Arduino, is under 40 dollars and can easily be halfed by using a less expensive microcontroller.
51+
52+
In terms of our technical stack, the raw sensor data was transmitted from an Arduino to a Python program over serial. This Python program computes the filtered positions of the pen, and transmits these to our main Node.js server which we set up using IBM Bluemix. From there, users can connect to our website to access all of the data present on the server. The client was written in javascript using both Angular and Node.js.

arduino/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
String2string Arduino sketch
2+
=========
3+
4+
Provides the ultrasonic range data for the client application.
5+
6+
Requirements
7+
=====
8+
9+
* Arduino Uno (others may work)
10+
* [NewPing Library](http://playground.arduino.cc/Code/NewPing)
11+
12+
Getting Started
13+
=====
14+
15+
Simply upload the sketch to the Arduino.
16+
17+
Default Pinouts
18+
=====
19+
20+
* Draw button - 8
21+
* Clear all button - 7
22+
* Left sensor trigger - 12
23+
* Left sensor echo - 11
24+
* Right sensor trigger - 10
25+
* Right sensor echo - 9

client/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
String2string client application
2+
=========
3+
4+
Interfaces with the chalkboard and arduino
5+
6+
Requirements
7+
=========
8+
* must have Python 3
9+
* must have pyserial
10+
* preferably run it on a Linux machine (the client looks for the serial connection in /dev/serial/by-id/)
11+
12+
Running the app
13+
=========
14+
<b>Must</b> set the webserver ip address in client.py.
15+
16+
To run the program:
17+
```
18+
python client.py
19+
```
20+
21+
or
22+
23+
```
24+
python3 client.py
25+
```

client/client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python
22
import string2string.string2string as s2s
33

4+
#EDIT THE FOLLOWING LINE
45
client = s2s.Client('string2string.mybluemix.net')
56
#client = s2s.Client('hackcooper.cloudapp.net')
67

stableweb/.bowerrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

stableweb/README.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

stableweb/app.js

Lines changed: 0 additions & 70 deletions
This file was deleted.

stableweb/bower.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

stableweb/config/configs.js

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)