The tutorial helped me getting started and so far my 8-bit NeoPixel (WS2812B) circle is running fine over PWM/GPIO18.
However I’m running into issues when trying to run these over SPI. The LED’s do light up, start running the strandtest sequence, but the 4th LED stays mostly green and the rest is mostly white and flickering. I’m suspecting there is something wrong the SPI timing or the Operationg System configuration.
Did anyone have a similar issue, or idea’s how to sort this out?
Steps of troubleshooting
- Switch wire from GPIO18 (PWM) to GPIO10 (SPI/MOSI), to switch from PWM to SPI operation.
- Edit
LED_PIN
from 18 to 10 in strandtest.py - Enable SPI in Raspbian (Raspbian Buster with desktop)
- Set
core_freq=250
andcore_freq_min=250
as the SPI rate is derrived from the Raspberry Pi’s core frequency, which can fluctuate. - Verified SPI enabled: devices are available in /etc/devices
- Verified SPI working: https://github.com/rm-hull/spidev-test and input is same as output, so OK.
- Using an Raspberry Pi 3B+, same results with a Raspberry Pi 2B. Did not test with Pi 4B 4GB yet.
- Event tried running the pixels using .NET Core to rule out issues related to python and it’s library (can set collor once, can’t update after that and LED’s turn white).
Wireinig and schematic
Video
PWM: Working as intended
SPI: Fliickering is hard to see on video, see 00:39+ to see the bottom LED light green.: