jacdac.i2c

Submodules

Package Contents

Classes

I2CClient

Inter-Integrated Circuit (I2C, I²C, IIC) serial communication bus lets you communicate with

class jacdac.i2c.I2CClient(bus: jacdac.bus.Bus, role: str)

Bases: jacdac.bus.Client

Inter-Integrated Circuit (I2C, I²C, IIC) serial communication bus lets you communicate with
  • many sensors and actuators.

Implements a client for the I2C service.

property ok: bool | None

Indicates whether the I2C is working.,

transaction(address: int, num_read: int, write_buf: bytes) None

address is 7-bit. num_read can be 0 if nothing needs to be read. The write_buf includes the register address if required (first one or two bytes).