Lab Assignment |
|||
|
Intro to Physical Computing Syllabus code, circuits, & construction
|
Serial Input to the Desktop |
||
|
Minimum parts needed: (new parts in bold. see parts list for details)
Step 1: Download Processing for your favorite platform, if you don't have it already. If you want to work in another programming language, feel free, as long as you do the same work in your language. |
|||
| Step 2:
Set up a basic serial output-to-desktop computer circuit as in the serial output lab. Connect an analog sensor to the microcontroller. Program the microcontroller to send the value of the sensor out serially as shown in the serial output lab. You will need to modify the code as appropriate to your sensor, so that you send a byte-sized range of numbers through the serial cable. Make sure you are getting something coming to the desktop using zTerm (mac) or HyperTerm (PC). |
|||
| Step 3:
Read the incoming data in Processing using the serial commands. Print the value to the screen, or use println() to print it to the debug window. If you prefer to use Director, Max/MSP, or another software environment that you know already, do so. |
|||
| Step 4:
Replace the mouse on your computer with a new device that you build. Make an application using at least two sensors, controlling two elements of a screen interface. For example, having two pots control the horizontal and vertical positions of an object onscreen. |