I2CDisplay – Manage updating a display over I2C

Manage updating a display over I2C in the background while Python code runs. It doesn’t handle display initialization.

class displayio.I2CDisplay(i2c_bus, *, device_address, reset=None)

Create a I2CDisplay object associated with the given I2C bus and reset pin.

The I2C bus and pins are then in use by the display until displayio.release_displays() is called even after a reload. (It does this so CircuitPython can use the display after your code is done.) So, the first time you initialize a display bus in code.py you should call :py:func`displayio.release_displays` first, otherwise it will error after the first code.py run.

  • i2c_bus (busio.I2C) – The I2C bus that make up the clock and data lines
  • device_address (int) – The I2C address of the device
  • reset (microcontroller.Pin) – Reset pin. When None only software reset can be used

Performs a hardware reset via the reset pin. Raises an exception if called when no reset pin is available.

send(command, data)

Sends the given command value followed by the full set of data. Display state, such as vertical scroll, set via send may or may not be reset once the code is done.