Hardware Reference
In-Depth Information
5 V
LDR
10 K Ω
0 V
Figure 12-5: An LDR in a voltage divider setup
Knowing the present amount of light is not very useful; it would be better if
the data could be logged so that you can see the evolution of light levels dur-
ing the day. For that, data will have to be logged. You could use the built-in
EEPROM, but EEPROM storage is limited, and getting data back onto your PC
could be complicated. SD cards have much larger capacity and can easily be
removed from the Arduino and read on any computer. Also, using an SD card
has another benei t; the resulting i le can be formatted into a specii c i le type. For
this application, you can create a CSV i le (short for Comma Separated Values).
This i le can be imported directly into any spreadsheet application, allowing
you to use the data to create graphs.
The schematic will be simple; only a few components are required for this
operation, but this application does require a shield with SD capability. The
schematic is listed in Figure 12-6.
Figure 12-6: Project schematic (Image created with Fritzing)
Search WWH ::




Custom Search