Skip to content

Commit 77ec69e

Browse files
authored
Merge pull request #89 from makermelissa/master
Updated for MatrixPortal S3
2 parents fd84548 + dbf3560 commit 77ec69e

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
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"

docs/conf.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,16 @@
2727
# Uncomment the below if you use native CircuitPython modules such as
2828
# digitalio, micropython and busio. List the modules you use. Without it, the
2929
# autodoc module docs will fail to generate with a warning.
30-
autodoc_mock_imports = ["supervisor", "rtc", "rgbmatrix", "framebufferio", "secrets"]
30+
autodoc_mock_imports = [
31+
"supervisor",
32+
"rtc",
33+
"rgbmatrix",
34+
"framebufferio",
35+
"secrets",
36+
"wifi",
37+
"ssl",
38+
"socketpool",
39+
]
3140

3241

3342
intersphinx_mapping = {

0 commit comments

Comments
 (0)