Skip to content

Test.Gpio.MCP3008

ebezine edited this page Feb 25, 2013 · 4 revisions

Test.Gpio.MCP3008 is a sample console program for Raspberry.IO.Components.Converter.Mcp3008 features. It demonstrates retrieving temperature and light values using a MCP3008 ADC and a basic implementation of the SPI protocol.

It must be started, with elevated privileges, as follow:

mono Test.Gpio.MCP3008.exe

That is, under Raspbian, if not running as root:

sudo mono Test.Gpio.MCP3008.exe
Pin settings

Test.Gpio.MCP3008 is targeted to run with a revision 1 or 2 boards having the following pins (as numbered on connector) wired:

  • P1-12 : SPI Clock signal
  • P1-16 : SPI MSIO signal
  • P1-18 : SPI MOSI signal
  • P1-22 : SPI CS signal

MCP3008 Model