0

RGB Matrix Sample Programs
Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Please be positive and constructive with your questions and comments.

RGB Matrix Sample Programs

by JPBOYLANJR on Mon Mar 12, 2018 4:37 pm

I built and installed a RGB Matrix HAT + RTC. I completed the software download no problem. The rpi-rgb-led-matrix folder was created and contains the files referenced in the Adafruit instructions and the read me file. The instructions indicate “sudo ./demo” is the first command to enter — I have tried all sorts of combinations result is always “command not found”. What have I missed?

Thanks

Jim

JPBOYLANJR
 
Posts: 4
Joined: Tue Feb 27, 2018 4:13 pm

Re: RGB Matrix Sample Programs

by adafruit_support_mike on Tue Mar 13, 2018 12:53 am

Are you sure you're entering the command from the directory where the demo script lives?

What output do you get from `ls -l`?

adafruit_support_mike
 
Posts: 50758
Joined: Thu Feb 11, 2010 2:51 pm

Re: RGB Matrix Sample Programs

by JPBOYLANJR on Tue Mar 13, 2018 4:39 pm

ls -l produced a list of 18 items that included several python program names and other items such as: Desktop, Downloads, Documents, Music, Pictures, Scratch, rbi-matrix.sh, rgn-matrix.sh, rpi-rgb-led-matrix —

I also tried opening Python 3.5.3 and running one of the programs in /home/pi/rpi-rgb-led.matrix/python/samples the program was simple.square.pi it appears to run printing a message “Press CTRL-C to stop sample” however the LED display remains blank. I have confirmed 5 volts are present at the power plug on the display. I am using the 5 volt 4 amp power supply. The Pi is being powered by its own original power supply. The 16 pin cable is connected from the HAT to the display socket marked “input” arrow pointing to the power plug. I moved the 16 pin cable to the other socket, columns 16 and 32 on the display illuminate white. Program still does not run.

This Pi is being used in an after school coding club, previously I had a Pi Sense Hat on it which worked fine — could this be creating a conflict with the current install?

Also thanks for the quick response to the original post,

Jim

JPBOYLANJR
 
Posts: 4
Joined: Tue Feb 27, 2018 4:13 pm

Re: RGB Matrix Sample Programs

by adafruit_support_mike on Wed Mar 14, 2018 7:08 pm

If the list didn’t contain ‘demo’, you were entering the command from the wrong directory.

The list you described sounds like a RasPi home directory that’s been connected to a Mac using the Mac’s native file sharing. It expects to see directories named Documents, Desktop, and so on, and creates them if it doesn’t see them. You probably need to enter the command:

Code: Select all | TOGGLE FULL SIZE
cd rpi-rgb-led-matrix
then run `ls -l` again to see if one of the items is named ‘demo’.

Running the code from a Python prompt will only work if you used:

Code: Select all | TOGGLE FULL SIZE
sudo python3
to launch the interpreter. The RasPi restricts access to the GPIO pins, and the `sudo` command gives the following command the access rights to do that.

adafruit_support_mike
 
Posts: 50758
Joined: Thu Feb 11, 2010 2:51 pm

Re: RGB Matrix Sample Programs

by JPBOYLANJR on Thu Mar 15, 2018 6:08 pm

Thanks for the help on this. Once I got to the right directory and added “sudo” before Python3 and the program name all of the sample programs worked as advertised. Next step is to add another 32 x 32 led matrix and dig into the programming. I am assuming there is nothing I can do to configure the Python3 IDLE to be able to run the programs without using the command line.

Thanks again for the help:)

Jim

JPBOYLANJR
 
Posts: 4
Joined: Tue Feb 27, 2018 4:13 pm

Re: RGB Matrix Sample Programs

by adafruit_support_mike on Thu Mar 15, 2018 6:34 pm

IDLE will run with the correct privileges if you use `sudo` to launch it.

If you’re launching it from the GUI, there are ways to edit the resource files to make that happen. Hit the search engines with ‘launch IDLE as root’ and look for versions that match the version of Raspbian you’re using.

adafruit_support_mike
 
Posts: 50758
Joined: Thu Feb 11, 2010 2:51 pm

Re: RGB Matrix Sample Programs

by JPBOYLANJR on Sun Mar 18, 2018 4:15 pm

Thanks again for your help on this. As a result of your recommendations not only is the original problem fixed, we have many new areas to explore. I am launching the Python3 IDLE from a command line as sudo that allows us to run the samples using the IDLE. I am researching the changes that need to be made To enable launching launching IDLE from the GUI so it can access GPIO. We are planning on adding a secon 32x32 panel to experiment with.

Jim

JPBOYLANJR
 
Posts: 4
Joined: Tue Feb 27, 2018 4:13 pm

Re: RGB Matrix Sample Programs

by adafruit_support_mike on Mon Mar 19, 2018 1:43 am

Glad to hear you've gotten things working. Happy hacking!

adafruit_support_mike
 
Posts: 50758
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.