5,710
edits
Changes
→Serial Basics
Checking program flow, communicating the status of things to the user or debugger (you!).
Inside the Arduino software, we will use the "Serial Monitor" to observe what is going on with the serial port. Here is where you will see data printed with the <code>Serial.print()</code> command, and you can also send some very simple messages back to the processor with the "Send" button.
** 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 estimating the high and low voltages for our sensor inputs.
== Controlling the Arduino from a Computer ==