Changes

Jump to: navigation, search

Week 4 Lab

1,156 bytes added, 15:44, 21 April 2009
Homework
* You should be able to change the color of the on-screen square by dialing the knobs back and forth.
 
== Send data from your sensor to the computer ==
* Assuming you have a sensor which produces an analog output, hook it up to one of the Analog Inputs on your arduino. If you do not have a sensor, use the light sensor from last week. If you are not sure how your sensor works, come over and talk to me and we can try to figure it out.
* Run a short program to read data from that sensor and send it to the Serial port.
** You will need a <code>setup()</code> block, which initializes the Serial communication <code>Serial.begin(9600);</code>
** And in the main loop of the program (<code>loop()</code>), you will need to do the <code>analogRead()</code> and <code>Serial.print()</code> commands from above.
* See what the output from your Sensor is. How does it change as you manipulate your sensor? This is what we were getting at last week figuring out the voltage range for our sensors: when we want to use a sensor to make a project sensitive and responsive to the environment, we need to know what voltages correspond to the conditions of interest. When you start with a new project, this sort of Serial communication is a very valuable tool.
== Homework ==

Navigation menu