rpi-ws281x / rpi-ws281x-java

Apache License 2.0
19 stars 20 forks source link

Problem with Pi3B+ #11

Open Kefschke opened 5 years ago

Kefschke commented 5 years ago

I followed the Instructions and compiled it for myself on a Raspberry Pi 3B+ When i start using it my LED's are flickering in random colors. What is the problem? I decided to move to https://github.com/mattjlewis/diozero/blob/master/diozero-ws281x-java and have the same issues...

Tom-The-Geek commented 5 years ago

Is the kernel module for the audio jack loaded? It will cause issues if it is.

maxnz commented 5 years ago

This is a problem with the GPU not being initialized completely. If there is no monitor plugged in on boot it will only partially initialize. The way to get around this is to either plug it into a monitor when first booting the Pi (only needs to be connected on boot) or to use a dummy plug that pretends to be a monitor. The one I use is https://www.amazon.com/gp/product/B074FT1P8M.

I found this out literally the night before a presentation on a library some friends and I made for LEDs for a CS class (AnimatedLEDStrip). The LEDs would work in my room, but once we tried to go anywhere else on campus, they would do the flickering thing. I finally realized that it was because I'd always plug my Pi 3B into my monitor when I was in my room.

In my testing, I have found that this affects the 3B and 3B+ on PWM. Switching to SPI seems to also fix the problem.