Hi folks -- I'm porting my Photon code to Photon 2, which means replacing FastLED with Particle-NeoPixel. I've got basic light controls working, but the color order for my WS2815 strip has Red and Green reversed. Note that I'm specifying WS2813 when I initialize the strip, as that's the latest model supported by the Particle-NeoPixel library.
The Particle-NeoPixel library doc says: Note: RGB order is automatically applied to WS2811, WS2812/WS2812B/WS2812B2/WS2813/TM1803 is GRB order.
With this library, Is there a "right" way to use the WS2813 protocol but reverse the led order to be RGB? I tried using WS2811 in my code but then the lights don't respond at all.
I could hack the neopixel.cpp code to just reverse the order that red/green are treated in all of the methods, but that seems really... hacky.
Thanks, Chris. FWIW, with the FastLED library, I would use WS2812B and it worked great -- both protocol and color order. So I believe the protocol is the same (though I'm not sure why the RGB order was fine with FastLED, but reversed with this library.) The WS2815 is just a 12V version of WS2813. I even tried WS2812B with NeoPixel-Particle to be sure, and R/G were still reversed.
I'm not a terribly experienced C coder, but it's pretty clear how the RGB order gets set in the CASE statements in neopixel.cpp. I'd be happy to take a swing at updating that and testing it on my WS2815 strip.
I cloned the repo and started to make the changes, and it complied fine but wouldn't flash to the Photon 2. Suspecting a conflict between the cloned version vs the packaged version (despite updating my #define statements and the includePath in c_cpp_properties.json).
As a quick fix, I wrote a function that just swaps red/green on every pixel on my strip before calling strip.show().