Following Getting Started guide for Raspberry Pi (how do I use Analog pins)?

This page on Adafruit mentions how to use a MCP3008:

It is in Python however.

This library makes the MCP3008 work with Arduino but I bet it could be ported to work with Particle on Raspberry Pi:

You would likely have to wire it up like this:

  • MCP3008 VDD to Raspberry Pi 3.3V
  • MCP3008 VREF to Raspberry Pi 3.3V
  • MCP3008 AGND to Raspberry Pi GND
  • MCP3008 DGND to Raspberry Pi GND
  • MCP3008 CLK to Raspberry Pi SCLK
  • MCP3008 DOUT to Raspberry Pi MISO
  • MCP3008 DIN to Raspberry Pi MOSI
  • MCP3008 CS/SHDN to Raspberry Pi CE0