With WebIOPi 0.6+, you can use Serial/I2C/SPI/1-Wire devices directly from the REST API without writing macros.
WebIOPi drivers inherit from a common devices abstraction set (Temperature, Analog converter, GPIO Expander...) providing a consistent and unique set of function. Low level access to Serial, I2C and SPI is provided by lightweights classes available in the WebIOPi core without dependencies. Configuration is provided with the /etc/webiopi/config file. Devices and bus drivers can also be directly used in your Python script.
Python library REST API Javascript library
Name | RAW Access | Comment |
---|---|---|
Serial | Supports native UART and USB adapters | |
I2C | REST API provided with component drivers below | |
SPI | REST API provided with component drivers below | |
1-Wire | REST API provided with component drivers below |
Product page Datasheet Python library REST API Javascript library
Name | Bus | Description | Links | Support | Comment |
---|---|---|---|---|---|
ADS1014 | I2C | 12-bits 1-channel ADC | Not tested | ||
ADS1015 | I2C | 12-bits 4-channels ADC | |||
ADS1114 | I2C | 16-bits 1-channel ADC | Not tested | ||
ADS1115 | I2C | 16-bits 4-channels ADC | Not tested | ||
MCP3004 | SPI | 10-bits 4-channels ADC | |||
MCP3008 | SPI | 10-bits 8-channels ADC | |||
MCP3204 | SPI | 12-bits 4-channels ADC | |||
MCP3208 | SPI | 12-bits 8-channels ADC | |||
MCP4725 | I2C | 12-bits 1-channel DAC | |||
MCP4921 | SPI | 12-bits 1-channel DAC | |||
MCP4922 | SPI | 12-bits 2-channels DAC | |||
PCA9685 | I2C | 12-bits 16-channels PWM |
Product page Datasheet Python library REST API Javascript library
Name | Bus | Description | Links | Support | Comment |
---|---|---|---|---|---|
DS2408 | 1-Wire | 8-channels Addressable Switch | Driver submitted by Stuart Marsden | ||
MCP23008 | I2C | 8-bits I/O Expander | |||
MCP23009 | I2C | 8-bits I/O Expander with Open-Drain Output | |||
MCP23017 | I2C | 16-bits I/O Expander | |||
MCP23018 | I2C | 16-bits I/O Expander with Open-Drain Output | |||
MCP23S08 | SPI | 8-bits I/O Expander | |||
MCP23S09 | SPI | 8-bits I/O Expander with Open-Drain Output | |||
MCP23S17 | SPI | 16-bits I/O Expander | |||
MCP23S18 | SPI | 16-bits I/O Expander with Open-Drain Output | |||
PCF8574 | I2C | 8-bits I/O Expander |
Product page Datasheet Python library REST API Javascript library
Name | Bus | Description | Links | Support | Comment |
---|---|---|---|---|---|
BMP085 | I2C | Pressure & Temperature sensor | |||
DS1822 | 1-Wire | Temperature sensor | |||
DS1825 | 1-Wire | Temperature sensor | |||
DS18B20 | 1-Wire | Temperature sensor | |||
DS18S20 | 1-Wire | Temperature sensor | |||
DS28EA00 | 1-Wire | Temperature sensor | |||
TMP75 | I2C | Temperature sensor | |||
TMP102 | I2C | Temperature sensor | |||
TMP275 | I2C | Temperature sensor | |||
TSL2561 | I2C | Luminosity sensor | Driver submitted by Andreas Riegg | ||
TSL4531 | I2C | Luminosity sensor | Driver submitted by Andreas Riegg | ||
VCNL4000 | I2C | Luminosity and Distance sensor with IR | Driver submitted by Andreas Riegg |
Product page Datasheet Python library REST API Javascript library
I cannot write a driver for all components, mainly because I don't have them, and I cannot buy everything. I could write drivers simply reading specs, but I will not be able to certify it work.
Feel free to submit any component you use and/or would like to use with WebIOPi on the forum. Depending on demands, I may write the driver if I can have a sample.
If you know how the device work on it's low level interface, look on the source repository, starting with PCF8574, write your own and submit it. You can also provide me a sample so I can write the driver.