Appendix C. Analog Input

In this book, you learned about digital inputs and outputs with buttons, switches, LEDs and relays. Each of these components were always either on or off, never anything in between. However, you might want to sense things in the world that are not necessarily one or the other, for instance: temperature, distance, light levels, or the status of a dial.

Unfortunately, you can’t read these types of sensors directly on the Raspberry Pi since there are only digital inputs on the board. But you’re not totally out of luck; there are a few different ways of using additional components to read analog sensors using the Pi’s digital inputs.

Converting Analog to Digital

To convert from analog to digital, this appendix will show you how ...

Get Getting Started with Raspberry Pi now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.