Changes

Jump to: navigation, search

Week 4 Lab

1,028 bytes removed, 15:44, 21 April 2009
Serial Basics
*Open the Sketchbook->Examples->Communication->ASCIITable, compile it, and run it on your processor.
* This program does basic text communication from the processor to your PC, running through all of the characters in the alphabet.
* Click on the "Serial Monitor" button (to the right of the "Upload to Board" button) in the arduino software. verify that your processor is communicating with the PC (do you see the letters streaming by?)* 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 This is your sensor works, come over and talk to me and we can try to figure it out. * Run a short program to read processor sending data from that sensor and send it to the Serial portcomputer. ** You We 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 toollater.
== Controlling the Arduino from a Computer ==

Navigation menu