Skip to content

Commit 81e964d

Browse files
committed
Fix for new I2CDevice API.
1 parent 8f30e9f commit 81e964d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

adafruit_ht16k33/ht16k33.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def __init__(self, i2c, address=0x70):
2121
def _write_cmd(self, byte):
2222
self._temp[0] = byte
2323
with self.i2c_device:
24-
self.i2c_device.writeto(self._temp)
24+
self.i2c_device.write(self._temp)
2525

2626
def blink_rate(self, rate=None):
2727
if rate is None:
@@ -40,10 +40,9 @@ def brightness(self, brightness):
4040

4141
def show(self):
4242
with self.i2c_device:
43-
self.i2c_device.writeto(self._buffer) # Byte 0 is 0x00, address of
44-
# LED data register. The
45-
# remaining 16 bytes are The
46-
# display register data to set.
43+
# Byte 0 is 0x00, address of LED data register. The remaining 16
44+
# bytes are the display register data to set.
45+
self.i2c_device.write(self._buffer)
4746

4847
def fill(self, color):
4948
fill = 0xff if color else 0x00

0 commit comments

Comments
 (0)