CHAPTER 3
Reading Analog Sensors
Parts You'll Need for This Chapter
Arduino Uno
Small breadboard
Jumper wires
10kΩ potentiometer
10kΩ resistor (×2)
220Ω resistor (×3)
USB cable
Photoresistor
TMP36 temperature sensor (or any other 5V analog sensor)
5mm common-cathode RGB LED
CODE AND DIGITAL CONTENT FOR THIS CHAPTER
Code downloads, video, and other digital content for this chapter can be found at www.exploringarduino.com/content/ch3.
In addition, all code can be found at www.wiley.com/go/exploringarduino on the Download Code tab. The code is in the chapter 03 download and individually named according to the names throughout the chapter.
The world around you is analog. Even though you might hear that the world is “going digital,” the majority of 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 handful of the analog sensors that you can interface with your Arduino. Using skills that you acquired in the preceding chapter, you will add light sensors ...
Get Exploring Arduino: Tools and Techniques for Engineering Wizardry now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.