Skip to content

Specify pixel order #19

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

Merged
merged 1 commit into from
Jun 15, 2022
Merged
Changes from all 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: 4 additions & 2 deletions adafruit_neotrellis/neotrellis.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from time import sleep
from micropython import const
from adafruit_seesaw.keypad import Keypad, KeyEvent
from adafruit_seesaw.neopixel import NeoPixel
from adafruit_seesaw.neopixel import NeoPixel, GRB

_NEO_TRELLIS_ADDR = const(0x2E)

Expand Down Expand Up @@ -60,7 +60,9 @@ def __init__(self, i2c_bus, interrupt=False, addr=_NEO_TRELLIS_ADDR, drdy=None):
super().__init__(i2c_bus, addr, drdy)
self.interrupt_enabled = interrupt
self.callbacks = [None] * _NEO_TRELLIS_NUM_KEYS
self.pixels = NeoPixel(self, _NEO_TRELLIS_NEOPIX_PIN, _NEO_TRELLIS_NUM_KEYS)
self.pixels = NeoPixel(
self, _NEO_TRELLIS_NEOPIX_PIN, _NEO_TRELLIS_NUM_KEYS, pixel_order=GRB
)

def activate_key(self, key, edge, enable=True):
"""Activate or deactivate a key on the trellis. Key is the key number from
Expand Down