Closed
Description
I'm using a 8x8 bi-color matrix with the HT16K33 Led Backpack on a QTPY RP2040 running CircuitPython 7.3.2 (2022-07-20).
I'm noticing red and green LEDs invert when shifting pixels by an odd amount. There's also an inconsistency between green and red when using the fill() method and when changing the colour of individual pixels.
My code below highlights this behaviour (although it also occurs with the ht16k33_matrix_simpletest).
import board
import time
from adafruit_ht16k33.matrix import Matrix8x8x2
i2c = board.I2C()
matrix = Matrix8x8x2(i2c)
matrix.fill(1) # 1 should be red, but it sets all pixels green
matrix[0, 0] = 1 # Makes the 1st pixel red
time.sleep(1)
matrix.shift_up() # Shifts pixels up 1, colours are inverted so red = green, green = red
time.sleep(1)
matrix.shift_up() # Shifts pixels up 1, colours are inverted so red = green, green = red
time.sleep(1)
matrix.shift(0,2) # Shifts pixels up 2, colours remain the same
time.sleep(1)
matrix.shift(0,3) # Shifts pixels up 3, colours are inverted again so red = green, green = red
Metadata
Metadata
Assignees
Labels
No labels