Skip to content

Commit

Permalink
Keybow 2040: Run IS31 I2C at 400KHz.
Browse files Browse the repository at this point in the history
Speed up Keybow 2040 I2C further to ~5ms (200FPS) by increasing from the default 100KHz to 400KHz I2C.

Since Keybow 2040 does not include a Qw'St connector, we need not worry about other I2C devices.

Signed-off-by: Phil Howard <github@gadgetoid.com>
  • Loading branch information
Gadgetoid committed Jun 9, 2024
1 parent 02da608 commit 4026aa6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion boards/pimoroni/keybow_2040/keybow_2040_rgb.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import board
import busio
from micropython import const

from adafruit_bus_device.i2c_device import I2CDevice
Expand All @@ -23,7 +24,8 @@ def __init__(
self,
size: int = 16 # Kept for backward compatibility
):
self.i2c_device = I2CDevice(board.I2C(), 0x74)
self.i2c = i2c = busio.I2C( board.SCL, board.SDA, frequency=400_000)
self.i2c_device = I2CDevice(i2c, 0x74)
self.out_buffer = bytearray(144)
self._pixels = 16
self._frame = 0
Expand Down

0 comments on commit 4026aa6

Please sign in to comment.