Hardware Reference
In-Depth Information
Enable button
Figure 6-16: Temperature and light sensor circuit
Indicator LED
Temperature sensor
Photoresistor
Using the same debouncing function that you implemented in Chapter 2,
“Digital Inputs, Outputs, and Pulse-Width Modulation,” you use the pushbutton
to toggle the logging mode on and off. While in logging mode, the Arduino polls
the sensors and “types” those values into your computer in a comma-separated
format once every second. An indicator LED remains illuminated while you are
logging data. Because you want the Arduino to be constantly polling the state
Search WWH ::




Custom Search