Chapter 3

Reading Analog Sensors

Chapter Summary

This chapter covered the following concepts:

  • The differences between analog and digital signals
  • How to convert analog signals to digital signals
  • How to read an analog signal from a potentiometer
  • How to display data using the serial monitor
  • How to interface with packaged analog sensors
  • How to create your own analog sensors
  • How to map and constrain analog readings to drive analog outputs

Parts List

Optional Parts:

Useful Links

Color Wiring Diagrams


Follow along with a video to learn about reading analog inputs with your Arduino



This video explains the basic differences between analog and digital signals:




Chapter 3 Code Download

All code is licensed via the GNU GPL v3. Code is maintained and updated on GitHub. The download zip linked above always contains the most recent version of the code examples that have been pushed to the GitHub Code Repository.

References & Credits

  • Figure 3-7: TMP36 Temp/Voltage Graph Credit: Analog Devices, Inc., (source, PDF)
  • Figure 3-10: Photoresistor Photo Credit: courtesy element14 (source)