scottlawsonbc / audio-reactive-led-strip

:musical_note: :rainbow: Real-time LED strip music visualization using Python and the ESP8266 or Raspberry Pi
MIT License
2.7k stars 642 forks source link

RPi 4b - ws2811_init failed with code -11 (Selected GPIO not possible) #283

Closed Theauxm closed 4 years ago

Theauxm commented 4 years ago

GPIO Sheet for my board: https://www.raspberrypi.org/documentation/usage/gpio/

As seen on that page, GPIO12 and GPIO13 support PWM. I've changed the LED_PIN property in strandtest.py to 12, 13, 32, and 33, though the only one that doesn't give the following error is 12. When I use 12, the lights do not turn on (Have GND on pin 34, and Data has been switched between 32/33 to troubleshoot). Not too familiar with hardware so I don't know where to begin with this issue.

File "strandtest.py", line 91, in strip.begin() File "/usr/local/lib/python3.7/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 -11 (Selected GPIO not possible) Segmentation fault

Theauxm commented 4 years ago

Found out my issue was that I wasn't providing power to the LEDs

:)