Skip to content

display.getColor returns incorrect values (flashing between red and blue) #27

@stitch

Description

@stitch

I'd assume that with the following statement, the display would keep the same color. But instead, the display flashes between red and blue every statement. The value that is written is not related to what is returned.

display.drawPixel(x, y, display.getPixel(x, y))

A loop of this method, when occasionally setting the display to a new color results in odd behavior. The red/blue can be see with 0xff0000 and 0xff.

New color: 0xff6e6e
The display is now: 0x2121ff
The display is now: 0xff0303
The display is now: 0xff
The display is now: 0xff0000
The display is now: 0xff
The display is now: 0xff0000
The display is now: 0xff
The display is now: 0xff0000
The display is now: 0xff
The display is now: 0xff0000
New color: 0x59ffac
The display is now: 0x5fff15
The display is now: 0x2ff18
The display is now: 0x2ff00
The display is now: 0xff00
The display is now: 0xff00
The display is now: 0xff00
The display is now: 0xff00
The display is now: 0xff00
The display is now: 0xff00
The display is now: 0xff00

Generated with:

        for x in [1, 2, 3, 0]:
            for y in [1, 2, 3, 0]:
                read = display.getPixel(x, y)
                display.drawPixel(x, y, read)
        print("The display is now: " + hex(read))

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