Skip to content

Swapping order of R and G LEDs, using board defined pins. #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions adafruit_is31fl3731.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,10 +504,10 @@ def pixelrgb(self, x, y, r, g, b, blink=None, frame=None):
:param blink: True to blink
:param frame: the frame to set the pixel
"""
x = x + (4 * y)
x = 15 - (x + (4 * y))

super().pixel(x, 0, r, blink, frame)
super().pixel(x, 1, g, blink, frame)
super().pixel(x, 0, g, blink, frame)
super().pixel(x, 1, r, blink, frame)
super().pixel(x, 2, b, blink, frame)

# pylint: disable=inconsistent-return-statements
Expand Down
3 changes: 1 addition & 2 deletions examples/is31fl3731_keybow_2040_rainbow.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import time
import math
import board
import busio

import adafruit_is31fl3731

Expand Down Expand Up @@ -62,7 +61,7 @@ def hsv_to_rgb(hue, sat, val):
return (val, p, q)


i2c = busio.I2C(board.GP5, board.GP4)
i2c = board.I2C()

# Set up 4x4 RGB matrix of Keybow 2040
display = adafruit_is31fl3731.Keybow2040(i2c)
Expand Down