User Manual
I
2
CDriver User Guide 11
4.1.1 Reference
class i2cdriver.I2CDriver(port=’/dev/ttyUSB0’, reset=True)
A connected I2CDriver.
Variables
• product – product code e.g. i2cdriver1
• serial – serial string of I2CDriver
• uptime – time since I2CDriver boot, in seconds
• voltage – USB voltage, in V
• current – current used by attached device, in mA
• temp – temperature, in degrees C
• scl – state of SCL
• sda – state of SDA
• speed – current device speed in KHz (100 or 400)
• mode – IO mode (I2C or bitbang)
• pullups – programmable pullup enable pins
• ccitt crc – CCITT-16 CRC of all transmitted and re-
ceived bytes
init (port=’/dev/ttyUSB0’, reset=True)
Connect to a hardware i2cdriver.
Parameters
• port (str ) – The USB port to connect to
• reset (bool ) – Issue an I2C bus reset on connection
setspeed(s)
Set the I2C bus speed.
Parameters s (int ) – speed in KHz, either 100 or 400
setpullups(s)
Set the I2CDriver pullup resistors
Parameters s – 6-bit pullup mask
©2019 Excamera Labs










