micropython-ht16k33 icon indicating copy to clipboard operation
micropython-ht16k33 copied to clipboard

Remove dependency on adafruit-circuitpython-busdevice

Open hgcummings opened this issue 2 years ago • 2 comments

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.

hgcummings avatar May 23 '22 15:05 hgcummings

I have also tested this with a Raspberry Pi Pico W and both an Adafruit HT16K33 14-segment backpack and a 16x8 Matrix backpack.

mattiasa avatar Jul 09 '22 18:07 mattiasa

I can also confirm that this is working on the Adafruit_HT16K33 alphanumeric display with backpack.

plmetz avatar Dec 08 '22 21:12 plmetz