MCP3000 series SPI Analog-to-Digital Converter

Supported interfaces

Python Constructor

Use following constructors if you want to create some MCP3000 from your python scripts.

Parameters :

from webiopi.devices.analog import MCP3004, MCP3008, MCP3204, MCP3208

# Setup a MCP3008 on SPI CE0
mcp0 = MCP3008()
# or
mcp0 = MCP3008(chip=0)

# Setup a MCP3008 on SPI CE1
mcp1 = MCP3008(chip=1)

Configuration File syntax

Use following syntax to setup some MCP3000 in the webiopi service/command configuration file.

[DEVICES]
# Setup a MCP3008 on SPI CE0
mcp0 = MCP3008
# or
mcp0 = MCP3008 chip:0

# Setup a MCP3008 on SPI CE1
mcp1 = MCP3008 chip:1