3Interfacing with Analog Sensors
What You'll Need for This Chapter
- 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)
- TMP36 analog temperature sensor
- Sharp GP2Y0A21YK0F IR distance sensor with JST cable
- ADXL335, ADXL377, or ADXL326 triple-axis accelerometer
- 5 mm white LED
- 5 mm common-anode RGB LED
- CODE AND DIGITAL CONTENT FOR THIS CHAPTER
- Code downloads, videos, and other digital content for this chapter can be found at:
exploringarduino.com/content2/ch3- Code for this chapter can also be obtained from the Downloads tab on this book's Wiley web page:
wiley.com/go/exploringarduino2e
The world around you is analog. Even though you might hear that the world is “going digital,” most observable features in your environment will always be analog in nature. The world can assume an infinite number of potential states, whether you are considering the color of sunlight, the temperature of the ocean, or the concentration of contaminants in the air. This chapter focuses on developing techniques for discretizing these infinite possibilities into palatable digital values that can be analyzed with a microcontroller system like the Arduino.
In this chapter, you will learn about the differences between analog and digital signals and how to convert between the two, as well as a ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access