Adafruit is open and shipping! Let's build back better, together!

Matrix portal m4
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Matrix portal m4

by gkbutts on Sat Nov 14, 2020 8:05 pm

Hello I just purchased a Matrix Portal M4. I believe that it is not functioning properly I have tried all of the sample codes that I can find and none of them seem to be working properly. I have a 16 x 32 P10 board. I have followed the instructions for the scrolling text. It is appears to be scrolling however it is gibberish. I have tried the backpack code end it also appears to be‘s working except I cannot see the letters V 0 T E. The Colors appear but they are rectangular blocks no letters.

Posts: 9
Joined: Sat Nov 14, 2020 12:17 am

Re: Matrix portal m4

by franklin97355 on Sat Nov 14, 2020 8:37 pm

Can you post pictures of your connections and the display you are describing? It will help.

Posts: 21647
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

Re: Matrix portal m4

by gkbutts on Sat Nov 14, 2020 9:42 pm

[code ... sp=sharing
video of Simple two-line text scroller ... sp=sharing
video of Display

]# This example implements a simple two line scroller using
# Adafruit_CircuitPython_Display_Text. Each line has its own color
# and it is possible to modify the example to use other fonts and non-standard
# characters.

import adafruit_display_text.label
import board
import displayio
import framebufferio
import rgbmatrix
import terminalio

# If there was a display before (protomatter, LCD, or E-paper), release it so
# we can create ours

# This next call creates the RGB Matrix object itself. It has the given width
# and height. bit_depth can range from 1 to 6; higher numbers allow more color
# shades to be displayed, but increase memory usage and slow down your Python
# code. If you just want to show primary colors plus black and white, use 1.
# Otherwise, try 3, 4 and 5 to see which effect you like best.
# These lines are for the Feather M4 Express. If you're using a different board,
# check the guide to find the pins and wiring diagrams for your board.
# If you have a matrix with a different width or height, change that too.
# If you have a 16x32 display, try with just a single line of text.
matrix = rgbmatrix.RGBMatrix(
width=32, bit_depth=4,

# Associate the RGB matrix with a Display so that we can use displayio features
display = framebufferio.FramebufferDisplay(matrix, auto_refresh=False)

# Create two lines of text to scroll. Besides changing the text, you can also
# customize the color and font (using Adafruit_CircuitPython_Bitmap_Font).
# To keep this demo simple, we just used the built-in font.
# The Y coordinates of the two lines were chosen so that they looked good
# but if you change the font you might find that other values work better.
line1 = adafruit_display_text.label.Label(
text="This scroller is brought to you by CircuitPython RGBMatrix")
line1.x = display.width
line1.y = 8

line2 = adafruit_display_text.label.Label(
text="Hello to all CircuitPython contributors worldwide <3")
line2.x = display.width
line2.y = 24

# Put each line of text into a Group, then show that group.
g = displayio.Group()

# This function will scoot one label a pixel to the left and send it back to
# the far right if it's gone all the way off screen. This goes in a function
# because we'll do exactly the same thing with line1 and line2 below.
def scroll(line):
line.x = line.x - 1
line_width = line.bounding_box[2]
if line.x < -line_width:
line.x = display.width

# This function scrolls lines backwards. Try switching which function is
# called for line2 below!
def reverse_scroll(line):
line.x = line.x + 1
line_width = line.bounding_box[2]
if line.x >= display.width:
line.x = -line_width

# You can add more effects in this loop. For instance, maybe you want to set the
# color of each label to a different value.
while True:
p10board2.jpg (537.52 KiB) Viewed 51 times
p10board.jpg (439.25 KiB) Viewed 51 times

Posts: 9
Joined: Sat Nov 14, 2020 12:17 am

Please be positive and constructive with your questions and comments.