To hook an LED matrix to the MatrixPortal M4 board, just connect the power wires and press it on. Check out the Prep the MatrixPortal page for more detailed information. You can learn more about using the MatrixPortal in our Adafruit MatrixPortal M4 guide.
displayio.release_displays() matrix = rgbmatrix.RGBMatrix( width=64, bit_depth=4, rgb_pins=[ board.MTX_R1, board.MTX_G1, board.MTX_B1, board.MTX_R2, board.MTX_G2, board.MTX_B2 ], addr_pins=[ board.MTX_ADDRA, board.MTX_ADDRB, board.MTX_ADDRC, board.MTX_ADDRD ], clock_pin=board.MTX_CLK, latch_pin=board.MTX_LAT, output_enable_pin=board.MTX_OE ) display = framebufferio.FramebufferDisplay(matrix)
displayio.release_displays() matrix = rgbmatrix.RGBMatrix( width=32, bit_depth=4, rgb_pins=[ board.MTX_R1, board.MTX_G1, board.MTX_B1, board.MTX_R2, board.MTX_G2, board.MTX_B2 ], addr_pins=[ board.MTX_ADDRA, board.MTX_ADDRB, board.MTX_ADDRC ], clock_pin=board.MTX_CLK, latch_pin=board.MTX_LAT, output_enable_pin=board.MTX_OE ) display = framebufferio.FramebufferDisplay(matrix)
64x64 Matrix
Use the following block of code to initialize a 64x64 matrix. Don't forget to close the Address E Line jumper with solder. You'll need to check the datasheet for your matrix to determine whether to connect it to Pin 8 or 16.
Don't forget to close the Address E Line jumper first.
displayio.release_displays() matrix = rgbmatrix.RGBMatrix( width=64, height=64, bit_depth=4, rgb_pins=[ board.MTX_R1, board.MTX_G1, board.MTX_B1, board.MTX_R2, board.MTX_G2, board.MTX_B2 ], addr_pins=[ board.MTX_ADDRA, board.MTX_ADDRB, board.MTX_ADDRC, board.MTX_ADDRD, board.MTX_ADDRE ], clock_pin=board.MTX_CLK, latch_pin=board.MTX_LAT, output_enable_pin=board.MTX_OE ) display = framebufferio.FramebufferDisplay(matrix)
Page last edited March 08, 2024
Text editor powered by tinymce.