A great way to get started with RGBMatrix is with the RGB Matrix Shield and the Metro ESP32-S2. Now you can quickly and easily create projects featuring your favorite 16 or 32-pixel tall matrix boards.


For a small panel, you can use the screw terminals on the Adafruit RGB Matrix Shield together with a an appropriate DC power adapter on the Metro. For a larger panel, you'll need an independent 5V supply at several amps.
In any case, using USB power alone is not recommended, as the RGB Matrix can draw a lot of current.
Each Shield kit comes with one Shield PCB, a 2x8 IDC header, 5.08mm terminal block, and some male header.
Use the following block of code to initialize a 64x32 matrix.
displayio.release_displays() matrix = rgbmatrix.RGBMatrix( width=32, bit_depth=6, rgb_pins=[board.IO7, board.IO8, board.IO9, board.IO10, board.IO11, board.IO12], addr_pins=[board.A0, board.A1, board.A2, board.A3], clock_pin=board.IO13, latch_pin=board.IO15, output_enable_pin=board.IO14, ) display = framebufferio.FramebufferDisplay(matrix)
Use the following block of code to initialize a 32x16 matrix. In this mode, you may not use pin A3 unless you cut the trace connecting it to the header, because it is connected to GND on the RGB matrix.
displayio.release_displays() matrix = rgbmatrix.RGBMatrix( width=32, bit_depth=4, rgb_pins=[board.IO7, board.IO8, board.IO9, board.IO10, board.IO11, board.IO12], addr_pins=[board.A0, board.A1, board.A2], clock_pin=board.IO13, latch_pin=board.IO15, output_enable_pin=board.IO14, ) display = framebufferio.FramebufferDisplay(matrix)
Page last edited March 08, 2024
Text editor powered by tinymce.