Esp32-snippets: Adafruit neoPixelType order

Created on 24 Jan 2017  路  5Comments  路  Source: nkolban/esp32-snippets

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

All 5 comments

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

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.

Closing ... believed resolved.

Indeed resolved. Thx Neil!

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mgleason picture mgleason  路  11Comments

wegunterjr picture wegunterjr  路  7Comments

HarrisonOfTheNorth picture HarrisonOfTheNorth  路  8Comments

d3cline picture d3cline  路  4Comments

mahdikan picture mahdikan  路  4Comments