Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pi RGBW NeoPixel support incomplete? #56

Closed
waded opened this issue Nov 30, 2018 · 8 comments
Closed

Pi RGBW NeoPixel support incomplete? #56

waded opened this issue Nov 30, 2018 · 8 comments

Comments

@waded
Copy link

waded commented Nov 30, 2018

I was working through https://learn.adafruit.com/neopixels-on-raspberry-pi/python-usage, adding https://learn.adafruit.com/circuitpython-essentials/circuitpython-neopix to understand how to add the W component (using bpp=4), with a Raspberry Pi Zero W and the RGBW Neopixel strip.

It didn't seem to work correctly. The result of this script:

import board
import neopixel
pixels = neopixel.NeoPixel(board.D18, 20, bpp=4, auto_write=False)
pixels.fill((255, 0, 0, 0))
pixels.write()

was a repeating pattern of red, blue, unlit, green down the strip. I expected them to all be red (or at least all the same color.)

I took a look at the code and eventually got to 1f9263a, which implies RGBW is supported, but it didn't appear the W bits were being shifted in for the call to ws.ws2811_led_set, which would explain the behavior I saw.

@ladyada
Copy link
Member

ladyada commented Nov 30, 2018

hmm thats odd - it does work with normal RGB neopixels right?

@waded
Copy link
Author

waded commented Nov 30, 2018

@ladyada Unfortunately I don't have any RGBs to test. I'll edit issue to add example code and the resulting color sequence here in a sec.

@waded
Copy link
Author

waded commented Nov 30, 2018

I will add that I did try rpi_ws281x's Python examples, notably SK6812_strandtest.py, which does solid color fills, including white, and that was working as expected.

@ladyada
Copy link
Member

ladyada commented Nov 30, 2018

oh ok you know i know what happened, i can fix it

@caternuson
Copy link
Contributor

does this need updating to sync up with latest RGBW tweaks?
https://github.com/adafruit/Adafruit_Blinka/blob/master/src/adafruit_blinka/microcontroller/raspi_23/neopixel.py#L71

@ladyada
Copy link
Member

ladyada commented Nov 30, 2018

no i think its just the way the raspi neopixel driver expects data, if i set it to RGBW i think i have to shift data in differently. im getting an RGBW ring to do a proper test

@waded
Copy link
Author

waded commented Nov 30, 2018

I'd be happy to test a fix on my strip when you have one. I prototyped a fix (changed the # assign all colors! block to also be based on LED_STRIP and shift the w value out of buf into pixel in the RGBW case), but I don't have a way to test anything but that.

@ladyada
Copy link
Member

ladyada commented Dec 1, 2018

i believe its now fixed in a PR

@ladyada ladyada closed this as completed Dec 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants