Chapter 3 (1st Edition)

If you are looking for the Chapter 3 content for the 2nd Edition of Exploring Arduino, please click here.

Reading Analog Sensors

Parts List

Optional Parts:


Download Code (1st Edition, Chapter 3)
(Also available on GitHub)

Useful Links


  • On page 57, it should be noted that the reading from the photoresistor will change once the LED is programmed to turn on. In an otherwise dark room, the light from the LED will impact the reading from the photoresistor. You can compensate for this by adjusting your thresholds in code or by putting a paper cone around the photoresistor to block out stray light that isn’t coming from overhead.
    (Issue reported by Aaron Williams)

Color Wiring Diagrams


Follow along with a video to learn about reading analog inputs with your Arduino:

This video explains the basic differences between analog and digital signals: