luma.led_matrix icon indicating copy to clipboard operation
luma.led_matrix copied to clipboard

MAX7219 snake pattern

Open ChrisToxz opened this issue 7 months ago • 1 comments

I have 24 8x8 LED modules in a 8x3 setup (8 columns, 3 rows) Is it possible to drive multiple MAX7219 in a snake pattern?

I see apa102 & ws2812 supports a mapping parameter, but MAX7219 does not.

I would like to have my modules connected like: Row 0 → [0][1][2][3][4][5][6][7] Row 1 ← [15][14][13][12][11][10][9][8] Row 2 → [16][17][18][19][20][21][22][23]

I'm working on a custom PCB board and with above layout, the connection between module 7 and 8 can be as short as possible, rather than going from one side to the other side of the PCB.

Am I missing something in the docs and is this already possible? If not, any headups how I could achieve this anyhow?

ChrisToxz avatar May 21 '25 13:05 ChrisToxz

from memory, the apa mapping is per single pixel so relatively straightforward.

form max7219, it would need to be per 8x8 pixel block - so the existing wouldnt work, but it should be pretty easy to do - it might be as simple as providing a different set of offsets, here:

https://github.com/rm-hull/luma.led_matrix/blob/main/luma/led_matrix/device.py#L80-L82

rm-hull avatar May 23 '25 13:05 rm-hull