-
Notifications
You must be signed in to change notification settings - Fork 101
Default pixel_order and bpp don't match #46
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
Comments
oops yeah we are usually wordy in the definitions - we could warn people for now they must define the color order? |
Just to throw out the suggestion - how about removing |
im ok with that, do any of our examples use bpp? |
All the examples here are using @tannewt You were more involved in the |
I'd ask @rhooper since he's got some big changes in the pipe for the RGB led libs. |
@rhooper - see above. What are the changes? |
@tannewt Any idea of status of above w.r.t. "big changes"? I'm in favor of getting rid of |
The changes will be to use _pixelbuf which will be using a string to compute everything to do with the byte order and bpp. Bpp will then be able to be based on that string. For backwards compatibility we can check its a sane value and ignore otherwise. |
@rhooper thanks. can you link to where this is being done? it's still not clear to me how this applies here. |
Here's the repos for the WIP. Ping me on Discord if you want to discuss in more real-time. Dan also wants to sync up on this work soon. https://github.com/rhooper/circuitpython/tree/new-pixelbuf-api |
@caternuson is this still an issue? |
@rhooper Thanks! Yah, this is probably fixed with the new logic. Let's close this for now. I think it might still be worth considering dumping |
Hi all, I have recently purchased a NeoPixel Ring - 12 x 5050 RGB LED from amazon. I have also followed the link https://cdn-learn.adafruit.com/downloads/pdf/neopixels-on-raspberry-pi.pdf So, I can turn the LEDS, but they are not acting as desired, for instance, colors are randomly changing/blinking. So, for the test, I want to turn all the LEDs on and be colored red: `import time pixel_pin = board.D18 pixel = neopixel.NeoPixel(pixel_pin, num_pix, brightness = 0.2, auto_write = False, pixel_order = order) while True: what am I missing, why, few of LED gets change colors, blinking and etc. |
@houshmandX Please post in the forums with photos of your setup: |
If NeoPixels are created without specifying a
bpp
or apixel_order
:then this would get used:
Adafruit_CircuitPython_NeoPixel/neopixel.py
Lines 94 to 96 in c0bdd8b
and
bpp=3
by default:so you end up with
bpp=3
and GRBW forpixel_order
, which isbpp=4
.This is my bad, since it was introduced with #24 to fix #1. I think there was some attempt to maintain backwards compatibility with the older style of using
bpp
only. So that's why bothbpp
andpixel_order
are still there:#1 (comment)
But might be good to somehow check and protect against this:
https://forums.adafruit.com/viewtopic.php?f=47&t=151980
The text was updated successfully, but these errors were encountered: