MCP3002 ADC sensor
Constructor to create MPC3002 sensor
arObj - the arduino parent object
selectPin - the SPI cs select pin
propertyname, propertyvalue - optional property name, value pairs.
Current properties are:
Reference voltage for scaling the ADC inputs (default 5.0)
obj - created MCP3002 object
a = arduino()
sensor = arduinosensor.MPC3002(a, "d10")
Read the voltage from a channel
dsObj - the MPC3002 object
chan - the channel to read (0 or 1)
voltage - read voltage.
a = arduino()
s = arduinosensor.MPC3002(a, "d10")
volts = readVoltage(s, 0)
See also: arduinosensor.MPC3002.
Package: arduino