Skip to content

Commit 56b59fb

Browse files
authored
Merge pull request #24 from makermelissa/master
Added support for nrf52840 RGB Matrix Featherwing
2 parents e0abfba + d993539 commit 56b59fb

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

adafruit_matrixportal/matrix.py

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,27 @@ def __init__(self, *, width=64, height=32, bit_depth=2, alt_addr_pins=None):
7070
latch_pin = board.MTX_LAT
7171
oe_pin = board.MTX_OE
7272
elif "Feather" in os.uname().machine:
73-
print("Feather Detected")
7473
# Feather Style Board
75-
if height > 16:
76-
addr_pins.append(board.A2)
77-
rgb_pins = [board.D6, board.D5, board.D9, board.D11, board.D10, board.D12]
78-
clock_pin = board.D13
74+
if "nrf52" in os.uname().sysname:
75+
# nrf52840 Style Feather
76+
addr_pins = [board.D11, board.D5, board.D13]
77+
if height > 16:
78+
addr_pins.append(board.D9)
79+
rgb_pins = [board.D6, board.A5, board.A1, board.A0, board.A4, board.D11]
80+
clock_pin = board.D12
81+
else:
82+
addr_pins = [board.A5, board.A4, board.A3]
83+
if height > 16:
84+
addr_pins.append(board.A2)
85+
rgb_pins = [
86+
board.D6,
87+
board.D5,
88+
board.D9,
89+
board.D11,
90+
board.D10,
91+
board.D12,
92+
]
93+
clock_pin = board.D13
7994
latch_pin = board.D0
8095
oe_pin = board.D1
8196
else:

0 commit comments

Comments
 (0)