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.7k stars 1.17k forks source link

Run text rotation #1537

Closed Solaerts closed 1 year ago

Solaerts commented 1 year ago

I have 2 matrix of 64x32 and I have connected them in parallel to have one matrix of 64x64. I was scrolling a text from right to left but I want to to scroll from up to down. How do I do that pls ? I am using a raspberry pi 2 and I am coding in python with Thonny.

hzeller commented 1 year ago

You want it to be 90 degrees rotated ? You can use the rotate mapper: https://github.com/hzeller/rpi-rgb-led-matrix/tree/master/examples-api-use#rotate

Solaerts commented 1 year ago

I already done that, and it's not the result I am expecting. The result I want looks like this :

H E L L O

This scrolling from up to down.

hzeller commented 1 year ago

ah, that is simply how you program where the characters to appear. So you want to break your string apart into letters and write them at the same X pos and with a Y pos shifted according to the font height. And for scrolling you add an offset to the y coordinate for all of them (so for each update of the screen you add an offset for all characcters to be a bit more down).

But that is purely what your program will have to do, not an issue in or feature needed from this library.

anandrajgupta commented 1 year ago

"VerticalDrawText" function

https://github.com/hzeller/rpi-rgb-led-matrix/blob/master/lib/led-matrix-c.cc

hzeller commented 1 year ago

Ah, good point, I forgot that DrawVerticalText() was available.

Solaerts commented 1 year ago

Ok thanks guys it will help a lot.