If you are looking for the Chapter 3 content for the 1st Edition of Exploring Arduino, please click here.
Interfacing with Analog Sensors
Parts List
- Arduino Uno or Adafruit METRO 328
- USB cable (Type A to B for Uno, Type A to Micro-B for METRO)
- Half-size or full-size breadboard
- Assorted jumper wires
- 220Ω resistors (×3)
- 10kΩ resistors (×2)
- 10kΩ trim potentiometer
- Photoresistor
- An analog sensor (any of the following):
- 5mm white LED
- 5mm common-anode RGB LED
Code
Download Code (2nd Edition, Chapter 3)
(Also available on GitHub)
Useful Links
- Arduino Analog Input Pin Reference Page
- Arduino analogReference() Command Page
- Arduino analogRead() Command Page
- Arduino map() Command Page
- Arduino constrain() Command Page
- TMP36 Datasheet (PDF)
Videos
This video will teach you about the Arduino’s analog inputs:
This video is a primer on the differences between analog and digital signals on microcontrollers: