Let me apologize up front as this is my first attempt at programming a board. I am trying to build the Matrix Portal Scoreboard. I have followed the directions very carefully but have run into the following error:
code.py output:
Traceback (most recent call last):
File "code.py", line 8, in <module>
File "adafruit_matrixportal/matrixportal.py", line 32, in <module>
ImportError: no module named 'adafruit_portalbase'
I have searched through the code and don't see where it asks for that module.
I am using libraries from the bundle 6.x-mpy-20210330.
Any assistance would be greatly appreciated. And please let me know if I need to provide more information. Below, I will attach the code I have up to the last line given in the error.
- Code: Select all | TOGGLE FULL SIZE
# Scoreboard matrix display
# uses AdafruitIO to set scores and team names for a scoreboard
# Perfect for cornhole, ping pong, and other games
import time
import board
import terminalio
from adafruit_matrixportal.matrixportal import MatrixPortal
# --- Display setup ---
matrixportal = MatrixPortal(status_neopixel=board.NEOPIXEL, debug=False)
RED_COLOR = 0xAA0000
BLUE_COLOR = 0x0000AA
# Red Score
matrixportal.add_text(
text_font=terminalio.FONT,
text_position=(4, int(matrixportal.graphics.display.height * 0.75) - 3),
text_color=RED_COLOR,
text_scale=2,
)
# Blue Score
matrixportal.add_text(
text_font=terminalio.FONT,
text_position=(36, int(matrixportal.graphics.display.height * 0.75) - 3),
text_color=BLUE_COLOR,
text_scale=2,
)
# Red Team name
matrixportal.add_text(
text_font=terminalio.FONT,
text_position=(4, int(matrixportal.graphics.display.height * 0.25) - 4),
text_color=RED_COLOR,
)