Parts You'll Need for This Chapter
10kΩ resistor (×2)
220Ω resistor (×3)
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 ...