Is definitely within the capability of the Raspberry Pi Single Board Computer. You will definitely need to inject extra power with an external power supply. Refer to this fantastic Adafruit guide on the topic if you are planning on powering significantly more LEDs than a single 5 Metre roll. Thermal and electrical considerations need to be taken.
Hey thank you for the guide this is the only one that has got my lights to work in the first place but I am having a similar issue to those above about only the first couple of lights turning on. I have a Raspberry pi 2b and have turned dtparam=audio=on to off and am still having this issue. Any guidance at all would be helpful.
Hello,
This is my first raspberry pi project and I am sure that I have all of the hardware correct, however when I run the code, this error message comes up:
Can’t open /dev/mem: Permission denied
Traceback (most recent call last):
File “/home/cyrus/Desktop/strandtest.py”, line 91, in
strip.begin()
File “/usr/local/lib/python3.9/dist-packages/rpi_ws281x/rpi_ws281x.py”, line 131, in begin
raise RuntimeError(‘ws2811_init failed with code {0} ({1})’.format(resp, str_resp))
RuntimeError: ws2811_init failed with code -5 (mmap() failed)
None of the lights turn on and nothing happens.
Any Ideas??
Thanks for the help.
Its no good when things stop working suddenly, though I may be able to help. I just need to get a picture of what may be going wrong first.
What Pi model are you using? What length of LED strip have you got and how many LEDs per meter? Have you got an alternate power source like a Plugpack to supply enough current to the LED strip?
Let me know what your current set up looks like and I will try to help out.
-Its a Raspberry Pi 4 Model B
-I have a 5m WS2812B LED Strip
30 LEDs/m (150 LEDs Total)
I do have an alternate power supply. Its a 5v 10A Power Supply and I am using a barrel connector
Additional info:
I’m running the strandest.py code (changed the LED_COUNT to 150)
I am running Thonny with administrator privileges (sudo thonny)
I have run sudo nano boot/config.txt and changed dtparam=audio=on to dtparam=audio=off
Attached there are pictures of the setup running the strandest.py code
Not sure if you can help, but I tried installing the ’ *
dancyPi-audio-reactive-led’ thing and when I try to run the sudo python3 visualization.py scroll I get the following error.
Traceback (most recent call last):
File "/home/pi/dancyPi-audio-reactive-led/python/visualization.py", line 418, in
led.update()
File "/home/pi/dancyPi-audio-reactive-led/python/led.py", line 144, in update
_update_pi()
File "/home/pi/dancyPi-audio-reactive-led/python/led.py", line 108, in _update_pi
strip._led_data[i] = int(rgb[i])
AttributeError: 'Adafruit_NeoPixel' object has no attribute '_led_data'
Question about the two LED strip project. Would it be possible to connect the two strips to become one long strip and program the lights on each strip separately? For example, two 50 LED strips to become one 100 strip and LEDs 1-50 are yellow and LEDs 51-100 are purple?
You absolutely can, you’ll just have to change some of the code.
The number of LEDs and for your example you might want to write a dedicated function to display a couple of colours
Hi, I followed this guide and when I connect the LED, several lights start turning on and off. Mostly the first LED, and then starts changing color without any code running. I’ve tried connecting to a RPI3b and a RPI4 and always same strange behaviour. Running the code does not light up any leds … When I disconnect the LED power supply and connect it again, the same LEDS as before will light up … and eventually change again. Does the Led strip have any “memory” ?
I’m using a 1 meter WS2812B with 144 leds, with a 5V 2 Amp Power Supply. Raspberry Pi 4 Model B 1.5GHz 2GB. Raspberry Pi Os 64 bit.
Any help appreciated. Thanks
That means using this method and expanding on it you can easily control four fully addressable WS2812B strips independently with a single Raspberry Pi Single Board Computer.
Anyone managed to get four different strips to work independently? Please let me know how
In a sense you can control four strips, but it will be two pairs with the same effect.
The top comment talks about the pi only having two channels:
Hi Tiago
Just having a quick look and as the 2 red wires will be connected at the LED strip you will be putting that 12V onto the RPi pin. Now I don’t know exactly that RPi pin is but it is possible that the RPi has been damaged.
Cheers Bob
That would indicate that you are referencing a pixel beyond the end of the pixel chain. What is the value of x when the error occurs? How many pixels have you specified in the constructor for your pixels1 array?