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

Some patterns in LED display. #870

Open KeshavaShreenidhi opened 5 years ago

KeshavaShreenidhi commented 5 years ago

I have attached a video clip in that we can clearly see some patterns are rolling when I display a image in the screen. Is there any solution for this?

rgb_led_matrix video

hzeller commented 5 years ago

how did you connect the panel? This looks like a typical case of using the Adafruit Hat without doing the pwm modification.

Also make sure to do the usual methods to minimize flicker, such as the isolcpus setting.

angelogoncalve commented 5 years ago

Also beside hardware tricks to minimize the flicker :

CPU use: isolcpus=3

Adafruit Hat with doing the pwm modification: --led-gpio-mapping=adafruit-hat-pwm

do the change of theses flags: --led-slowdown-gpio=5 --led-pwm-bits=1 --led-pwm-dither-bits=2

KeshavaShreenidhi commented 5 years ago

Sorry I should have mentioned these earlier. I used Raspberry pi 3 B+ and seven P3 64x64 pixel led panels connected in a row. And I used the adapter board that you have mentioned ( https://raw.githubusercontent.com/hzeller/rpi-rgb-led-matrix/master/img/three-parallel-panels-soic.jpg ). Also I tried isolcpus=3, but there is no much noticeable changes observed. I observed those patterns when I used this command : "sudo python example_led.py --led-slowdown-gpio=2 --led-rows=64 --led-cols=64 --led-chain=7 --led-brightness=80 --led-pixel-mapper=Rotate:180 --led-pwm-bits=8 --led-pwm-lsb-nanoseconds=80"

I tried --led-slowdown-gpio=5 but it shows "error : argument --led-slowdown-gpio: invalid choice: 5 (choose from 0, 1, 2)" Also " error: unrecognized arguments: --led-pwm-dither-bits=2 "

Thank you.

hzeller commented 5 years ago

Are you doing anything on the Python code that is calculation intensive ? Python is very slow and taxing on the performance on other things. From the picture above it looks like you only show a static image though. If filled once and then you essentially sleep, that is ok (in general, using c++ is of course preferred to using Python. Only use Python if absolutely needed for something).

If you do change image content it is helpful to use SwapOnVsync() so that you don't introduce tearing.

If just showing static content you can of course simply use the provided led-image-viewer.

64x64 panels in a row is lot as these panels do 1:32 multiplexing, so a lot has to be clocked in per row. Using parallel chains and some pixel mapping can help.

Slowdown gpio will not bring advantage in the artifacts you see.

I suppose you did all the things mentioned in the readme in the troubleshooting section: not using gui, using minimal os, switching off one-wire etc. ?

angelogoncalve commented 5 years ago

For minimal OS used DietPi is not intensive for the disk of RPi3B+

KeshavaShreenidhi commented 5 years ago

I am using python but there is not much calculations involved. Even I tried the c++ version but no luck. Previously I was using vnc viewer but now i am not using it and i did almost all the things in the troubleshooting section and problem not resolved.

@angelogoncalve I'll definitely try and let you know.

Thank you.

KeshavaShreenidhi commented 5 years ago

Whether putting an raspberry pi 4B (4GB ram) instead of rpi 3 b+ will solve the problem? Does this library supports raspberry pi 4B?

angelogoncalve commented 5 years ago

RPi4B has more CPU.

Yes this driver supports Rpi4B.