Skip to content
This repository was archived by the owner on Sep 30, 2019. It is now read-only.
This repository was archived by the owner on Sep 30, 2019. It is now read-only.

Adafruit_8x8.py - addressing error in the ColorEightByEight class, setPixel() method. #66

@hybotix

Description

@hybotix

I found and fixed a problem with the setPixel() method that is fixed by adding the following code just under the line that reads "x %= 8" there. Without this patch, column 0 (x=0) is treated as column 7 (x=7). With this patch, all pixels are addressed correctly, from (0, 0) to (7, 7).

# This modification fixes the pixel addressing error
if (x == 0):
  x = 7
elif (x > 0):
  x = x - 1
# End of modification for the pixel addressing error

--> geekguy on Adafruit forums.

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