Skip to content

Commit 12fe157

Browse files
authored
Merge pull request #19 from caternuson/iss18
Specify pixel order
2 parents 818a37f + e7ef9ab commit 12fe157

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

adafruit_neotrellis/neotrellis.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
from time import sleep
3333
from micropython import const
3434
from adafruit_seesaw.keypad import Keypad, KeyEvent
35-
from adafruit_seesaw.neopixel import NeoPixel
35+
from adafruit_seesaw.neopixel import NeoPixel, GRB
3636

3737
_NEO_TRELLIS_ADDR = const(0x2E)
3838

@@ -60,7 +60,9 @@ def __init__(self, i2c_bus, interrupt=False, addr=_NEO_TRELLIS_ADDR, drdy=None):
6060
super().__init__(i2c_bus, addr, drdy)
6161
self.interrupt_enabled = interrupt
6262
self.callbacks = [None] * _NEO_TRELLIS_NUM_KEYS
63-
self.pixels = NeoPixel(self, _NEO_TRELLIS_NEOPIX_PIN, _NEO_TRELLIS_NUM_KEYS)
63+
self.pixels = NeoPixel(
64+
self, _NEO_TRELLIS_NEOPIX_PIN, _NEO_TRELLIS_NUM_KEYS, pixel_order=GRB
65+
)
6466

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

0 commit comments

Comments
 (0)