Hardware Reference
In-Depth Information
Example Application
In Chapter 12, you created a light sensor that was capable of logging data to an
SD card. In this chapter, you again use a light sensor, but one that can log the
temperature to a data i le with a timestamp and that can be read over a wire-
less connection.
To do this, you need an Arduino Yún and a micro-SD card to use for data
logging. A standard LDR will be connected to your Yún through the analog pin
A3. The sketch will wait 20 seconds between each measurement. During this
loop, the sketch will listen to connections from a web navigator.
Hardware
This sketch uses an Arduino Yún connected to a light-dependent resistor. One
pin of the LDR is connected to +5 V, and the other one is connected to a 10-kΩ
resistor that is connected to ground. The analog reading is made where the
LDR and the i xed value resistor are connected. The breadboard example will
look like Figure 23-1:
Figure 23-1: Project schematic (Image created with fritzing).
 
Search WWH ::




Custom Search