8

In Fast.Led lib for arduino there is a code to turn off all leds

FastLED.clear ();

Is there also a shortcut to turn all LEDs ON, and with a specific color

3
  • What leds/driver are you using?
    – Gerben
    Mar 18 '16 at 20:09
  • Arduino nano, FastLed lib and WS2812B leds
    – Niles
    Mar 18 '16 at 20:14
  • I think you could use showColor
    – Gerben
    Mar 19 '16 at 15:19
9

You can use fill_solid.

For example

fill_solid( leds, NUM_LEDS, CRGB(50,0,200));

Or

fill_solid( leds, NUM_LEDS, CRGB::Red);
1
  • Works fine. While FastLED.showColor() will not behave properly if you add delay after it,
    – mayid
    Oct 14 '20 at 2:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.