Skip to content

Shifting inverts red and green pixels on bi-color 8x8 matrix #102

Closed
@MakerThornhill

Description

@MakerThornhill

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions