The easiest way to get started with RGBMatrix is with the RGB Matrix FeatherWing. Now you can quickly and easily create projects featuring your favorite 16 or 32-pixel tall matrix boards.
Please note: This wing is only tested/designed to work with the SAMD51 M4 Feather or the nRF52840 Feather. It may be possible to use the extra holes as a prototyping area to adapt it to other Feathers, but that's beyond the scope of this guide.
This wing can be assembled in one of two ways. You can either solder in a 2x8 IDC shrouded header on the top, then plug in the IDC cable that came with your matrix. This makes it easy to stack on top of your Feather. Or, you can solder in the 2x10 socket header on the bottom of the Wing, and then stack your Feather on top. That way you can plug it directly into the back of the matrix *mind blown*
Either way you decide to go, you can plug a 5V DC power pack into the 2.1mm DC jack. That 5V is polarity protected and then output on the other side to a 5.08mm terminal block. An onboard regulator will provide 3.3V power to your Feather, so you don't need a separate USB or battery. This makes for a very compact build!
Each 'Wing kit comes with one FeatherWing PCB with surface mount parts attached, a 2x8 IDC header, a 2x10 female socket, 2.1mm DC jack, 5.08mm terminal block, and some male header. You may also want some Feather stacking headers or female headers depending on how you plan to attach/stack your Feather.
Use the following block of code to initialize a 64x32 matrix.
displayio.release_displays() matrix = rgbmatrix.RGBMatrix( width=64, bit_depth=4, rgb_pins=[board.D6, board.D5, board.D9, board.D11, board.D10, board.D12], addr_pins=[board.A5, board.A4, board.A3, board.A2], clock_pin=board.D13, latch_pin=board.D0, output_enable_pin=board.D1) display = framebufferio.FramebufferDisplay(matrix)
Use the following block of code to initialize a 32x16 matrix. In this mode, you may not use pin A2 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.D6, board.D5, board.D9, board.D11, board.D10, board.D12], addr_pins=[board.A5, board.A4, board.A3], clock_pin=board.D13, latch_pin=board.D0, output_enable_pin=board.D1) display = framebufferio.FramebufferDisplay(matrix)
Text editor powered by tinymce.