To hook an LED matrix to the Metro M4 Express or Metro M4 Airlift Lite, make the connections on the left. Remember that for a 16-line matrix, connect 4 GND wires and address wires A, B, and C. For a 32-line matrix, connect 3 GND wires and address wires A, B, C, and D.
Use the following block of code to initialize a 64x32 matrix. Remember to connect all 4 address pins: A, B, C, and D.
displayio.release_displays() matrix = rgbmatrix.RGBMatrix( width=64, bit_depth=4, rgb_pins=[board.D8, board.D9, board.D10, board.D11, board.D12, board.D13], addr_pins=[board.D4, board.D5, board.D6, board.D7], clock_pin=board.D1, latch_pin=board.D3, output_enable_pin=board.D2) display = framebufferio.FramebufferDisplay(matrix)
Use the following block of code to initialize a 32x16 matrix. Remember to connect just 3 address pins: A, B, and C. Hook a fourth GND wire instead of A3.
displayio.release_displays() matrix = rgbmatrix.RGBMatrix( width=32, bit_depth=4, rgb_pins=[board.D8, board.D9, board.D10, board.D11, board.D12, board.D13], addr_pins=[board.D4, board.D5, board.D6], clock_pin=board.D1, latch_pin=board.D3, output_enable_pin=board.D2) display = framebufferio.FramebufferDisplay(matrix)
Shields Up
If you're using the RGB Matrix Shield with the Metro M4 Express, you will need to make a hardware modification.
The RGB Matrix Shield is designed so that you can customize it to the requirements of your board. We need to change which pin is used for the "CLK" (clock) signal.
There is a small copper trace between the two larger pads. Using a razor blade, cut or scrape away this trace. (Young people, please have an adult do this step!) Then, use your multimeter in continuity mode to verify that there is no connection between the two rectangular pads.
Next, make a connection from the A4 pin to the CLK pin by soldering in a new wire as shown. The wire can be on the top or on the bottom.
Once that's done, use the following block of code to initialize a 64x32 matrix:
matrix = rgbmatrix.RGBMatrix( width=64, height=32, bit_depth=1, rgb_pins=[board.D2, board.D3, board.D4, board.D5, board.D6, board.D7], addr_pins=[board.A0, board.A1, board.A2, board.A3], clock_pin=board.A4, latch_pin=board.D10, output_enable_pin=board.D9, )
Use the following block of code to initialize a 32x16 matrix:
matrix = rgbmatrix.RGBMatrix( width=32, height=16, bit_depth=1, rgb_pins=[board.D2, board.D3, board.D4, board.D5, board.D6, board.D7], addr_pins=[board.A0, board.A1, board.A2], clock_pin=board.A4, latch_pin=board.D10, output_enable_pin=board.D9, )
Page last edited March 08, 2024
Text editor powered by tinymce.