Skip to content

Commit 11e860a

Browse files
committed
Updated for MatrixPortal S3
1 parent fd84548 commit 11e860a

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

adafruit_matrixportal/matrix.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,11 @@ def __init__(
7979
if -1 in (red_index, green_index, blue_index):
8080
raise ValueError("color_order should contain R, G, and B")
8181

82-
if "Matrix Portal M4" in os.uname().machine:
83-
# MatrixPortal M4 Board
82+
if (
83+
"Adafruit Matrix Portal" in os.uname().machine
84+
or "Adafruit MatrixPortal" in os.uname().machine
85+
):
86+
# MatrixPortal Board
8487
addr_pins = [board.MTX_ADDRA, board.MTX_ADDRB, board.MTX_ADDRC]
8588
if panel_height > 16:
8689
addr_pins.append(board.MTX_ADDRD)

adafruit_matrixportal/network.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,15 @@
2626
2727
"""
2828

29+
import os
2930
import gc
3031
import neopixel
3132
from adafruit_portalbase.network import NetworkBase
32-
from adafruit_portalbase.wifi_coprocessor import WiFi
33+
34+
if os.uname().sysname == "samd51":
35+
from adafruit_portalbase.wifi_coprocessor import WiFi
36+
else:
37+
from adafruit_portalbase.wifi_esp32s2 import WiFi
3338

3439
__version__ = "0.0.0+auto.0"
3540
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_MatrixPortal.git"

0 commit comments

Comments
 (0)