Hi all, I am attempting to build a clock using 3 strips of WS2812

Hi all,

I am attempting to build a clock using 3 strips of WS2812 all of different lengths from one arduino using 3 pins. When the seconds get to zero I want to be able to do the command FastLED.clear() but only on one strip not all 3. Is this possible? I have looked at the library examples but I cant seem to find any examples that do this. Any help would be very much appreciated.

Sorry, I meant to post this in support not discussion!!

The fastest way would be to set the desired strip to black, set the other tqo strips as desired and then http://FastLED.display().

Thanks John, I did try this but I wanted all the LEDs of one strip to blank at the same time as it does with FastLED.clear(), there are 180 LEDs for seconds and the update was not fast enough to clear all at the same time.

Is there a way to turn all the LEDs a colour at the same time. The code i have been using to update the colours is as follows:

for (int i = 0; i <= 180; i++) {
leds[i] = CRGB(0, 0, 0);
FastLED.show();
}

Is there a better way of doing this? I am pretty new to FastLED.

Have a look at the functions documentation:

http://fastled.io/docs/3.1/group___colorutils.html

You want fill_solid by the sounds of it.

Thanks Christian, I never found that document before, that’s a great help.

@paul_pritchard fill_solid is probably what you want to use, but your if loop would work if you take the http://FastLED.show() out of the loop so it’s not called 180 times. By updating the data for all 180 pixels first (with the if loop) and then calling http://FastLED.show() just once right after the loop it will be fast enough (basically the same as fill_solid).

Thanks for that, it makes sense to me now! I will give it a go later.