Overview

Teaching the Raspberry Pi how to read analog inputs is easier than you think! The Pi does not include a hardware analog-to-digital converter, but an external ADC (such as the MCP3008) can be used, along with some SPI code in Python to read external analog devices.

Here is a short list of some analog inputs that could be used with this setup:

This guide uses a potentiometer to control the volume of an audio tone, but the code can be used as the basis for any kind of analog-input project.

This guide was first published on Jul 29, 2012. It was last updated on Jul 29, 2012. This page (Overview) was last updated on Aug 22, 2019.