Closed Redrocirt closed 3 years ago
I think I figured out how to solve this (at least when the neopixels are connected to SPI0/GPIO10):
Simply change bit0 from 0b11000000
to 0b10000000
:
pixels = neopixel.NeoPixel_SPI(
spi, NUM_PIXELS, brightness=0.1, auto_write=False, pixel_order=PIXEL_ORDER, bit0=0b10000000
)
This seem to be working with both neopixel variants (RGB = Adafruit 4365 and RGBW = Adafruit 4776)
Hello there, I'm trying to use SPI to control some Neopixels but I am getting only some strange results. For example the Neopixels light up bright white instead of the given color.
Can someone please test if this SPI driver is still working with an up-to-date Raspberry Pi OS?
Here's my setup:
Raspberry Pi Zero W with up-to-date Raspberry Pi OS:
Linux raspberrypi 5.4.79+ #1373 Mon Nov 23 13:18:15 GMT 2020 armv6l GNU/Linux
SPI is enabled
Neopixel "DIN" is connected to Pin 19 = GPIO 10
Installed packages:
Test with RGB Neopixels (Adafruit 4356)
A simple test setup with only 4 connected neopixels. My simple test script:
The results are different with every call of the script. For example:
First call: All off - one red - ALL WHITE - all off Second call: ALL WHITE - one red - ALL WHITE - don' go off, stay bright white Third call: ALL WHITE - all off - one green - ALL WHITE - all off
Looks like there is something wrong in the shift register or bit/byte arrangement of the driver?
I tested different variations of my script with different colors. The neopixels often only light up bright white and sometimes they also do not turn off when
fill((0,0,0))
is called.In another test series I changed the script to RGBW (with 4 digit color declarations like
fill((10,0,0,0))
) and connected 4 RGBW neopixels (Adafruit 4776) instead of RGB. Same weird results, often only bright white instead of the defined color...Thanks for your support, happy holidays and stay safe and healthy