In This Chapter
Converting analog to digital
Building an analog-to-digital converter
Using a potentiometer
Creating an analog temperature sensor
Interfacing with an analog-to-digital microchip
The Raspberry Pi general-purpose input/output (GPIO) pins are capable of detecting digital signals — either high or low. The problem is, the world we live in is a lot less black-and-white than that. For example, what if you want to detect light, sounds, temperature, or pressure? A digital signal isn’t going to cut it. Instead, you need the ability to detect a range of electronic signals, and that’s where analog signals come in.
One of the shortcomings of the Raspberry Pi is that it doesn’t have any analog inputs. But you can easily solve this problem by using an analog-to-digital converter. In this chapter, you build your own converter, learn about different conversion methods, and write software for each. Toward the end of the chapter, we look at a high-precision ...