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

Adafruit neoPixelType order #1

Closed
Smeedy opened this issue Jan 24, 2017 · 5 comments
Closed

Adafruit neoPixelType order #1

Smeedy opened this issue Jan 24, 2017 · 5 comments

Comments

@Smeedy
Copy link

Smeedy commented Jan 24, 2017

When setting the pixel the neoPixelType is not taken into account (RGB versus GRB for example). So colours could be off as I had in my setup. One can make a crude hack to shift the pixel colors according to the used type, but a constructor parameter would be nice.

See https://github.com/adafruit/Adafruit_NeoPixel/blob/master/Adafruit_NeoPixel.h

great work

@nkolban
Copy link
Owner

nkolban commented Feb 4, 2017

Thank you sir ... I'll take a look and do as you ask. ... Neil

@nkolban
Copy link
Owner

nkolban commented Feb 16, 2017

Howdy @Smeedy ... I have attempted a fix. The default order in which colors are sent to the pixels remains "RGB". However, you can now customize the order. There is now a function on the WS2812 object class called setColorOrder(char *). This expects a three character string composed or the characters 'R', 'G' and 'B'. For example:

myWS212.setColorOrder("GRB")

Would then send the colors in GRB order next time show() is called. I hope this works, if not ... please post back.

@nkolban
Copy link
Owner

nkolban commented Apr 13, 2017

Closing ... believed resolved.

@nkolban nkolban closed this as completed Apr 13, 2017
@Smeedy
Copy link
Author

Smeedy commented Apr 26, 2017

Indeed resolved. Thx Neil!

@nkolban
Copy link
Owner

nkolban commented Apr 27, 2017

Awesome ... TY again kind sir and let me know if I can ever help again in the future.

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

2 participants