rpi-ws281x/rpi-ws281x-python

Entire strip lights up weirdly when using SPI / GPIO 10

ningelschlingel opened this issue · 1 comments

I used this package with PWM on GPIO 18 during the development.
In production I need it to run without root permission, which is why I switched over to SPI on GPIO 10.

Now I get this weird behaviour where suddenly the entire led strip lights up but in kind of a gradient:

enter image description here

The strip is connected to GND, 5V, and GPIO10 / MOSI / Pin 19.

Example usage of the Strip:

#strip = Adafruit_NeoPixel(led_count, led_pin, led_freq_hz, led_dma, led_invert, led_brightness, led_channel)
strip = Adafruit_NeoPixel(110, 10, 800000, 10, False, 255, 0)
# PWM would have GPIO 18 as led_pin
# strip = Adafruit_NeoPixel(110, 18, 800000, 10, False, 255, 0)
strip.begin()
strip.setPixelColor(0, Color(255, 255, 255))
strip.show()

I also implemented a draw-like mode where I can set the color for every specific led. Around every other color-setting-request this error occurs. I also set the entire strip on the same color to check if lies within the power supply, but if the error does not occur the entire strip lights up as it should.

I didn't find a documentation on how to use this library with SPI and what the differences in usage are compared to PWM.