0

Building an LED Matrix Display
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Building an LED Matrix Display

by krisdphillips on Fri Oct 06, 2017 3:13 pm

Hello all!

So, I recently purchased a 64x32 LED Matrix from the shop, along with a RPi3, an Adafruit LED Matrix Pi Hat with RTC, and have been playing around with the rpi-led-rgb-matrix software here:
https://github.com/hzeller/rpi-rgb-led-matrix

Linked from the Adafruit learning tutorial here:
https://learn.adafruit.com/adafruit-rgb ... i/overview

I have everything working properly and am able to display the demo stuff on the LED matrix just fine. Yay!

However, I'm planning on scaling the display to 3x2 panels (so 192x64 pixels) and I'm sort of stuck. The default led-matrix software allows for up to 32 led pixels high graphics and you can feed it .ppm files and such, but I need to figure out how to reconfigure the software to accommodate my particular matrix layout. I've been reading through the documentation and see there is a transformer code section, but its in C and I'm not particularly well versed in this language. I know Python fairly well, but the Adafruit python code has no mention of this ability other than a 64x64 display option.

Was hoping someone knew of how I would accomplish this or if there is another software project for driving these displays that I can use? I'm using this for both a practical use sign I'm trying to build in addition to wanting to use this for a future basic electronics course I'm hoping to teach for tinkers at my schools. Thanks in advance!

krisdphillips
 
Posts: 1
Joined: Fri Oct 06, 2017 3:05 pm

Re: Building an LED Matrix Display

by Robertdan on Tue Oct 10, 2017 1:41 am

Looks to me this is what you're looking for:
https://github.com/hzeller/rpi-matrix-pixelpusher

Section "Larger Displays" , "-U option" & "How about 6 panels?" However, that's for use with the "rpi-matrix-pixelpusher" software and not the "led-matrix" software from adafruit.

I would be interested in that too. I built a 64x64 matrix panel and the scrolling test demo "sudo ./led-matrix-r 32 -c 4 -t 60 -D 1 runtext.ppm" ; half the message runs right side up scrolling left to right, the other half is upside down scrolling right to left. I tried several different configuration options, seems that a height of 32 pixels is the max. I don't understand why this would be so limiting considering you can chain up many more panels.

Robertdan
 
Posts: 3
Joined: Tue Jul 18, 2017 1:48 am

Re: Building an LED Matrix Display

by Robertdan on Wed Oct 11, 2017 2:28 am

Have a look at this similar project "Raspberry Pi RGB LED Matrix Webapp", on the Software Prerequisites page: https://learn.adafruit.com/raspberry-pi ... requisites

The command line for running the Demo. After installing the necessary packages go to "rpi-rgb-led-matrix/examples-api-use", type sudo ./demo to see all the switches and parameters. I ran Demo option 1 (forward scrolling text) and got some interesting information back.

:~/rpi-rgb-led-matrix/examples-api-use $ sudo ./demo -D 1 runtext.ppm -m 10 --led-no-hardware-pulse --led-gpio-mapping=adafruit-hat -L --led-chain=4
Size: 64x64. Hardware gpio mapping: adafruit-hat
Read image 'runtext.ppm' with 500x32

:~/rpi-rgb-led-matrix/examples-api-use $ sudo ./demo -D 1 runtext16.ppm -m 10 --led-no-hardware-pulse --led-gpio-mapping=adafruit-hat -L --led-chain=4
Size: 64x64. Hardware gpio mapping: adafruit-hat
Read image 'runtext16.ppm' with 281x16

:~/rpi-rgb-led-matrix/examples-api-use $ sudo ./demo -D 1 runtext.ppm -m 10 --led-no-hardware-pulse --led-gpio-mapping=adafruit-hat -L --led-chain=12
Size: 192x64. Hardware gpio mapping: adafruit-hat
Read image 'runtext.ppm' with 500x32

Demo #2 ran half the size of the first demo, and as you see, that's because the ppm file is set to 16 pixels high. Therefore, if you create your own ppm file (perhaps with ImageMagick or use a free online image file to ppm converter (though I'm not so sure you can control the pixel height with an online converter)) This shouldn't be a problem if you just need scrolling text for your grid size.

Demo #3 was just to find your grid size, looks like 12 was the magic number. My grid is 64 x 64 (chain=4) and the .ppm file still ran without a problem or any noticeable difference when my chain length was set to 12.

To do this using the "led-matrix" executable try:
cd rpi-fb-matrix
nano matrix.cfg
chain_length = 12
Cntrl + O
Cntrl + x

Test:
sudo ./rpi-fb-matrix matrix.cfg

Based on the output from the other program I wouldn't think you'd need to adjust the "panels" section in the matrix.cfg

Give this a try and let us know!

Robertdan
 
Posts: 3
Joined: Tue Jul 18, 2017 1:48 am

Please be positive and constructive with your questions and comments.