0

neopixel spi raspberry Problem
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

neopixel spi raspberry Problem

by thebeater on Tue Nov 26, 2019 2:23 am

Hello together,

I have a problem to control SK6812 RGBW Strips with Raspberry python3 through neopixel_SPI.

When I start the application - the first led is getting red, but after one second all leds which are declared through NUM_PIXELS getting white.
Code: Select all | TOGGLE FULL SIZE
import time
import board
import neopixel
 
NUM_PIXELS = 12
PIXEL_ORDER = neopixel.GRB
COLORS = (0xFF0000, 0x00FF00, 0x0000FF)
DELAY = 1
 
spi = board.SPI()
 
pixels = neopixel.NeoPixel_SPI(spi,
                               NUM_PIXELS,
                               pixel_order=PIXEL_ORDER,
                               auto_write=False)
 
while True:
    pixels[0] = COLORS[0]
    pixels.show()
    time.sleep(DELAY)
    pixels[0] = COLORS[1]
    pixels.show()
    time.sleep(DELAY)


The used library is neopixel_spi, installed through this guide:
https://learn.adafruit.com/circuitpytho ... i?view=all

I did an upgrade of the neopixel library andbusdevice library through
Code: Select all | TOGGLE FULL SIZE
pip3 install --upgrade adafruit-circuitpython-neopixel
but the problem still exists.

Can anyone help me with this problem?

Thanks in advance,

thebeater
 
Posts: 3
Joined: Tue Nov 26, 2019 2:13 am

Re: neopixel spi raspberry Problem

by siddacious on Tue Nov 26, 2019 11:08 pm

I'll forward this to someone who will know better than me; hold tight!

siddacious
 
Posts: 406
Joined: Fri Apr 21, 2017 3:09 pm

Re: neopixel spi raspberry Problem

by danhalbert on Tue Nov 26, 2019 11:21 pm

Hi, since you said this is an RGBW strip, trying changing `PIXEL_ORDER` to `neopixel.GRBW`.

danhalbert
 
Posts: 2262
Joined: Tue Aug 08, 2017 12:37 pm

Re: neopixel spi raspberry Problem

by adafruit2 on Tue Nov 26, 2019 11:55 pm

hiya, please use the plain 'neopixel' library. spi neopixel is not as trustworthy!

adafruit2
Site Admin
 
Posts: 19647
Joined: Fri Mar 11, 2005 7:36 pm

Re: neopixel spi raspberry Problem

by thebeater on Wed Nov 27, 2019 2:28 am

Hi,

the normal neopixel library is based on the pwm system or?
is the pipeline in this library also dma powered?
Can I send there also the neopixel bytes with 800kbit/s?

Thanks in advance,

thebeater
 
Posts: 3
Joined: Tue Nov 26, 2019 2:13 am

Re: neopixel spi raspberry Problem

by adafruit_support_carter on Wed Nov 27, 2019 12:08 pm

Here's info on the other approach suggested:
https://learn.adafruit.com/neopixels-on ... thon-usage

But might be worth also making sure there's nothing odd going on with your hardware setup. Can you post a photo showing how everything is connected. What model Pi are you using? What specific NeoPixel product are you using?

adafruit_support_carter
 
Posts: 18190
Joined: Tue Nov 29, 2016 2:45 pm

Re: neopixel spi raspberry Problem

by thebeater on Mon Dec 02, 2019 10:23 am

Hello,

I'm using GPIO18 directly and use Raspberry Pi 3 B Plus.
The Pixel is SK6812 RGBW.

thebeater
 
Posts: 3
Joined: Tue Nov 26, 2019 2:13 am

Re: neopixel spi raspberry Problem

by adafruit_support_carter on Mon Dec 02, 2019 2:09 pm

If you are trying that with the NeoPixel_SPI class, that's not the hardware SPI line. See here:
https://learn.adafruit.com/circuitpytho ... wiring-3-5

If you are trying that with the kernel driver, see here:
https://learn.adafruit.com/neopixels-on ... -pi-wiring

adafruit_support_carter
 
Posts: 18190
Joined: Tue Nov 29, 2016 2:45 pm

Re: neopixel spi raspberry Problem

by thaamike on Tue Jan 12, 2021 5:35 pm

Hi,

I have connected raspberry pi 4 to WS2812 led's using pin gpio 10 (spi). After the first led is written correctly all the other leds go white. I noticed with my scope that the frequency drops from about 800kHz to 400kHz. Sometimes is happens after the 2nd write or 3rd. But the frequency just drops so that the leds see wrong information.

When is use the other GPIO's that are mentioned in the neopixel uber guide i have no problems at all. Only GPIO10 has issues.

Any idea how this could be fixed?

thaamike
 
Posts: 2
Joined: Tue Jan 12, 2021 5:30 pm

Re: neopixel spi raspberry Problem

by adafruit_support_carter on Tue Jan 12, 2021 7:30 pm

@thaamike Please start a new thread for your issue.

adafruit_support_carter
 
Posts: 18190
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.