jgarff / rpi_ws281x

Userspace Raspberry Pi PWM library for WS281X LEDs
BSD 2-Clause "Simplified" License
1.76k stars 616 forks source link

WS2812B not lighting up #467

Closed DaniLecx closed 3 years ago

DaniLecx commented 3 years ago

Hi everybody,

My led strip is not lighting up when I run "sudo python3 examples/strandtest.py" even though the script seems to run without errors.

I followed this tutorial https://tutorials-raspberrypi.com/connect-control-raspberry-pi-ws2812-rgb-led-strips/

I confirmed my led strip was working by using FastLed on Arduino, so the problem is coming from the Raspberry Pi 4 signal sent from GPIO 10 to the led strip.

I tried with SPI pin GPIO 10 and PWM pin GPIO 18, both not working.

I'm using a led strip of 15 leds WS2812B and here's the strandtest.py config:

LED_COUNT      = 15      # Number of LED pixels.
LED_PIN        = 10      # GPIO pin connected to the pixels (10 uses SPI /dev/spidev0.0).
LED_FREQ_HZ    = 800000  # LED signal frequency in hertz (usually 800khz)
LED_DMA        = 10      # DMA channel to use for generating signal (try 10)
LED_BRIGHTNESS = 255     # Set to 0 for darkest and 255 for brightest
LED_INVERT     = False   # True to invert the signal (when using NPN transistor level shift)
LED_CHANNEL    = 0       # set to '1' for GPIOs 13, 19, 41, 45 or 53

Any ideas why the leds don't light up?

DaniLecx commented 3 years ago

I solved it ! :D I was using LCD-show to control my touch screen, and I guess it was sending some data too on SPI pin. Be careful if you use a screen, it could mess up with your led strip signal.