hzeller / rpi-rgb-led-matrix

Controlling up to three chains of 64x64, 32x32, 16x32 or similar RGB LED displays using Raspberry Pi GPIO
GNU General Public License v2.0
3.63k stars 1.15k forks source link

How to change order of led panes #1188

Open eugenehr opened 3 years ago

eugenehr commented 3 years ago

Hi, guys. I've connected chain of two led panes (40x20) with the Amperka driver to the my Rpi4. All works but I cannot change the order of panels. pixel-mover shows X,Y = 0,0 on the second (right) pane not on the left. sudo ./rpi-rgb-led-matrix/examples-api-use/pixel-mover --led-rows=20 --led-cols=40 --led-multiplexing=16 --led-gpio-mapping=adafruit-hat --led-chain=2

photo_2020-10-31_21-45-22 photo_2020-10-31_21-45-23

peterp-ozzmaker commented 3 years ago

did you work out how to fix this? i have the same issue

eugenehr commented 3 years ago

No, I had to rewrite my software and remap pixel addressing

hzeller commented 3 years ago

These things can be simplified by using the library's PixelMapper feature - you can write a class that will tell how input to output pixels map, register it with the library and enable, and your application then does not have to worry about that anymore as it writes its images to the canvas which does the mapping to the right location on the panel automatically.

There are a few standard mappers defined that you can access directly at the command-line, e.g. things that rotate or mirror the image or accomodate certain panel wirings. But with the PixelMapper, the library gives you the liberty to define a special mapping needed in your project.