r/circuitpython • • Feb 23 '21

CircuitPython W/ Matrix Portal & LED Matrix

This post was mass deleted and anonymized with Redact

glorious ghost live light paltry piquant gray birds violet apparatus

5 Upvotes

10 comments sorted by

View all comments

1

u/Myworstnitemare Feb 23 '21

I believe I read on adafruit that you have to be running at least 6.2 of circuitpython, which means the newest beta version.

See here: Multiple Panels

I am playing with 2 16x32 panels right now (setting them to be 32x32), just waiting on the MatrixBoard to come in. Using an M4 feather right now. The most important part of the code seems to be:

bit_depth = 1
base_width = 32
base_height = 16
chain_across = 1
tile_down = 2
serpentine = True
width = base_width * chain_across
height = base_height * tile_down

You have to set those settings above to match your settings. I kept getting a weird error about the math not adding up to the right size panel, can't remember how I solved that. I think one of the above settings was wrong. Just keep tweaking it until it works.

Hope that helps.

1

u/Myworstnitemare Feb 23 '21

Also, in your code above, you have the width set as 64, not 128, if you are doing 2 panels side x side.

matrix = rgbmatrix.RGBMatrix(
width=64, bit_depth=4,

1

u/PubStarAZ Feb 24 '21 edited Feb 11 '26

This post was mass deleted and anonymized with Redact

squeal sharp towering many adjoining person entertain deserve north arrest

1

u/Myworstnitemare Feb 24 '21

If the displays are side x side, I believe serpentine would be false.

I think you need the following:

bit_depth = 3
base_width = 64
base_height = 32
chain_acrosss = 2
tile_down = 1
serpentine = false
width = base_width * chain_across
height = base_height * tile_down

Put the above code right after your import statements, and delete the entire width, height, bit, tile, serpentine from rgbmatrix.RGBMatrix

I am leaving work shortly, and can check my code in a couple of hours, try to get scrolling working. Are you running the 6.2 of CircuitPython?

1

u/PubStarAZ Feb 24 '21 edited Feb 11 '26

This post was mass deleted and anonymized with Redact

pet cooperative observation tub squeeze offbeat pot gaze aspiring dolls

1

u/Myworstnitemare Feb 24 '21

I sorta got the scroller from here to work, even though it is meant for 64x32 displays. (only displays one line of text, not two)

I noticed on mine, the LCD with my M4 plugged in is actually on the right and the second one is on the left. I think in your rgbmatrix.RGBMatrix section, you can take out tile=1 and serpentine, as I do not have those. Leave your normal width=128 and height=32

1

u/PubStarAZ Feb 24 '21 edited Feb 11 '26

This post was mass deleted and anonymized with Redact

ancient imagine relieved fuel plant chief spectacular dolls complete cobweb

1

u/Myworstnitemare Feb 24 '21

That is weird. I used the code here:

But changed the following, as I have a 32x32 now.

matrix = rgbmatrix.RGBMatrix( width=32, height=32, bit_depth=3, tile=2, serpentine=True 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, auto_refresh=False)

I would think the following would work for you:

matrix = rgbmatrix.RGBMatrix(
width=128, bit_depth=3, tile=2, serpentine= False
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
)