Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running demo, text-scroller etc, on a cube #1588

Closed
AnAxNu opened this issue Aug 29, 2023 · 1 comment
Closed

Running demo, text-scroller etc, on a cube #1588

AnAxNu opened this issue Aug 29, 2023 · 1 comment

Comments

@AnAxNu
Copy link

AnAxNu commented Aug 29, 2023

I built a LED matrix cube using 6 64x64 LED panels, a Raspberry Pi 3B and a ElectroDragon "RGB LED Matrix Panel Drive Board".
I have connected 2 LED panels in each chain and then use all 3 chains.

I created a 128x192 image that has 6 64 pixel squares with numbers, so I can see what goes where in the cube.
The image looks like this:
[1][2]
[3][4]
[5][6]

I show the image on the cube using this command:
sudo ./led-image-viewer 128x192.jpg --led-rows=64 --led-cols=64 --led-slowdown-gpio=4 --led-show-refresh --led-chain=2 --led-parallel=3 --led-brightness=20

This works perfectly, each side of the cube show a number.

My problem now is that I do not know how to proceed using other cool code.
A simple example would be if I run the text-scroller only side 1 and 2 of the cube show the text scrolling.
This is expected since the text-scroller does not see my display as a cube but a 128x192 display and side 1 and 2 together is the full width is the display.
But how would I go about getting the text to scroll around my cubes 4 sides?
In one configuration this would mean that the text would scroll though panel 1,2,3 & 4.
(because of short cables my cube sides are currently 1,2,3 & 6 - and bottom is 4 and top is 5)

Another example would be how to get the demo to work with my cube, since this also get split up on different sides:
sudo examples-api-use/demo -D0 --led-rows=64 --led-cols=64 --led-slowdown-gpio=4 --led-show-refresh --led-chain=2 --led-parallel=3 --led-brightness=20

In the longer run would I like to get the AdaFruit cube software to work, but since they use a single channel hat maybe that is difficult.

@AnAxNu
Copy link
Author

AnAxNu commented Dec 2, 2023

I started to do some coding to get the Adafruit cube to work using the ElectroDragon board (and also a BBC Micro:Bit accelerometer instead of the LIS3DH) and then came back to trying to get the text-scroller and led-image-viewer to work with the Adafruit cube configuration (placement and orientation of the panels).

There is ongoing discussion about a mapper Here, that would probably do what is needed but I wrote my own while messing with the cube.

Using my mapper I get the text-scroller and led-image-viewer to work on a cube, put together according to the Adafruit guide, using:

sudo ./text-scroller --led-rows=64 --led-cols=64 --led-slowdown-gpio=4 --led-show-refresh --led-chain=2 --led-parallel=3 --led-pixel-mapper="Rotate-panel:0|270,5|90;Reorder:4|1,3|0,2|3,1|5,0|1;Row-mapper:H" --led-brightness=40 -f ../fonts/9x18.bdf "... Hello ..." -y 20 -C 0,200,0
sudo ./text-scroller --led-rows=64 --led-cols=64 --led-slowdown-gpio=4 --led-show-refresh --led-chain=2 --led-parallel=3 --led-pixel-mapper="Rotate-panel:1|270,2|0,3|90,4|0;Row-mapper:V" --led-brightness=40 -f ../fonts/9x18.bdf "... Hello ..." -y 20 -C 0,200,0
sudo ./led-image-viewer --led-rows=64 --led-cols=64 --led-slowdown-gpio=4 --led-show-refresh --led-chain=2 --led-parallel=3 --led-pixel-mapper="Rotate-panel:1|270,2|0,3|90,4|0;Row-mapper:V" --led-brightness=40 ./256x64.png
sudo ./led-image-viewer --led-rows=64 --led-cols=64 --led-slowdown-gpio=4 --led-show-refresh --led-chain=2 --led-parallel=3 --led-pixel-mapper="Rotate-panel:0|270,5|90;Reorder:4|1,3|0,2|3,1|5,0|1;Row-mapper:H" --led-brightness=40 ./256x64.png

The Reorder mapper I wrote is ok to use to swap a panel or two but not very intuitive to use when reordering multiple panels.
I might re-write this to a simpler one that where you will simply give the order of the panels in a string (2-3-4-5-0-1).

The mapper/mappers that I wrote can be found here

@AnAxNu AnAxNu closed this as completed Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant