Skip to content

Commit

Permalink
Keybow 2040: Further tiny RGB speedup.
Browse files Browse the repository at this point in the history
Speed up RGB a little more by skipping the first 17 and last few unused elements.

Signed-off-by: Phil Howard <github@gadgetoid.com>
  • Loading branch information
Gadgetoid committed Jun 9, 2024
1 parent bea247a commit ff26328
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion boards/pimoroni/keybow_2040/keybow_2040_rgb.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def _transmit(self, buffer):

# We only actually use 16 * 3 = 48 LEDs out of the 144 total
# but at 400KHz I2C it's cheaper just to write the whole lot
i2c.write(bytes([_COLOR_OFFSET]) + self.out_buffer)
i2c.write(bytes([_COLOR_OFFSET + 17]) + self.out_buffer[17:140])

# Set the newly written frame as the visible one
i2c.write(bytes([_BANK_ADDRESS, _CONFIG_BANK]))
Expand Down

0 comments on commit ff26328

Please sign in to comment.