Author Options:

Arduino & Neo Pixel help... Answered

Hey Everyone !
I've been having some problems with the Adafruit Neo-Pixel Library Using Arduino.
I need to set the Entire strip to one color and no mater how many google searches I do I can't find the code. Rather then the "colorWipe" or "theaterChase" mode I need to set a strip of 39 pixels to one color all at once. Or, just fast enough that you can't tell the difference.
I remember using a command once that did this, but for the life of me I can't find it >.<
Any Ideas?


setpixel (n,r,g,b), where n is the number of the pixel, r is theredness, g, b, etc

So with a simple for loop, set pixel 0..n with the colour you want, then strip.show

Yeah that's what I'm working with right now.

using 39 Pixels in a strip, the code will look something like this...

Core.setPixelColor(X, Rout, Gout, Bout);

X = X-1;

if(x <0 || X<38) {

X = 38;



But I seem to remember there was a way to set all Pixels to one color with a single command. Maybe it was on a previous version of the Lib? I just want to avoid using the Loop function to speed up the refresh rate. My code has a few Delay's in it and I would rather not go back and change them all to the (Mills vs previous Mills) method.

Just seems like a waste of time to change them one by one when I want them all to be the same color anyway :/

The Adafruit library is IIRC designed to be universal. If you hang the pixels on the SPI bus, you can run them much, much faster.

A single command STILL has to write the data to the bus.

Look for alternative NeoPixel libraries. There isn't a definitive one.

I might just try the SPI later tonight; never though of that thanks !

Think I'll stick with adafruit for now. maybe on the next project I'll try a new one, but thanks again for the SPI tip, sothed it out nicely !