micropython-ht16k33
micropython-ht16k33 copied to clipboard
Remove dependency on adafruit-circuitpython-busdevice
Alters the base class to expect a MicroPython-native machine.I2C
object rather than expecting a CircuitPython busio.I2C
.
Tested with Raspbery Pi Pico and the Adafruit 14-segment LED HT16K33 backpack.
Example usage:
from machine import I2C, Pin
from ht16k33.segments import Seg14x4
i2c = I2C(0, scl=Pin(17), sda=Pin(16))
display = Seg14x4(i2c)
display.print("TEST")
This is an interface change so I don't necessarily expect the PR to be accepted, but it seems cleaner to avoid the additional dependency.
I have also tested this with a Raspberry Pi Pico W and both an Adafruit HT16K33 14-segment backpack and a 16x8 Matrix backpack.
I can also confirm that this is working on the Adafruit_HT16K33 alphanumeric display with backpack.