Back in 2013, I covered Matt Hawkins’ excellent post about using an MCP3008 analog-to-digital chip with a Raspberry Pi to read analog values, something that the Pi was previously incapable of doing. Now, we have the Raspberry Pi Pico which gives us the ability to read analog signals using its on-board capabilities. However, sometimes we need access to more analog inputs. This is where we can revert back to using an external chip, such as the MCP3008.
Romilly Cocking, who has been around the Raspberry Pi community since the very beginning, has taken on this task using MicroPython, Raspberry Pi’s recommended language for those who don’t want to get into the lower level stuff of C/C++. You can read his tutorial here – it goes into a lot of detail about SPI and how he found out the wrong way of doing it before finding success, and it’s well worth a read! 🙂