CircuitPython helper for Adafruit MatrixPortal M4, Adafruit RGB Matrix Shield + Metro M4 Airlift Lite, and Adafruit RGB Matrix FeatherWings
This driver depends on:
Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.
import time
import board
import terminalio
from adafruit_matrixportal.matrixportal import MatrixPortal
# --- Display setup ---
matrixportal = MatrixPortal(status_neopixel=board.NEOPIXEL, debug=True)
# Create a new label with the color and text selected
matrixportal.add_text(
text_font=terminalio.FONT,
text_position=(0, (matrixportal.graphics.display.height // 2) - 1),
scrolling=True,
)
SCROLL_DELAY = 0.03
contents = [
{ 'text': 'THIS IS RED', 'color': '#cf2727'},
{ 'text': 'THIS IS BLUE', 'color': '#0846e4'},
]
while True:
for content in contents:
matrixportal.set_text(content
7B06
span>['text'])
# Set the text color
matrixportal.set_text_color(content['color'])
# Scroll it
matrixportal.scroll_text(SCROLL_DELAY)
Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.
For information on building library documentation, please check out this guide.