Coding 4-wire Neopixel with Particle

I can’t get my code to work with 4-wire Neopixel (aka–APA102, WS2812) and my Particle. The only examples I can find using the “neopixel.h” library only use 3-wire neopixels. I can get this code to compile, but it doesn’t work because I don’t know what to do w/ the clock line. Meanwhile, I have found Arduino code for 4-wire neopixels, but it used the “FastLED.h” library, which isn’t compiling in the Particle IDE.

Right now I’d just like to be able to turn on the Neopixels. Thanks, Ben

The AP102 (aka DotStar but not Neopixel) protocol is really simple and best used in connection with the DMA capabilities of the hardware SPI interfaces on the device.
Here you find a really simple sample how to talk to these without the need for any extra library

About FastLED, you may want to file an issue on the contributors GitHub repo.

1 Like