0

I am fairly new to FASTLED programming and am looking to make my entire LED strip blink at the same time. Similar to the Example Sketch "Blink" however all 30 of my LEDS. I might just be having a temporary mind derp right now but I cant figure it out.

  • please post the sketch that you are using .... include a clear description of observed behavior – jsotola Aug 26 '18 at 3:25
  • look at the Cylon example code .... it shows you how to address the LEDs .... extrapolate to multiple LEDs ......... the Blink example blinks the first LED .... think about what you would have to change in the code to blink the second LED ..... how would you blink the first and second LED at the same time? – jsotola Aug 26 '18 at 3:48
0

FastLED has a function called fill_solid() which will change the color of an indicated range of LEDs in a strip.

From https://github.com/FastLED/FastLED/wiki/Controlling-leds#set-rgb-color

use new 'fill_solid', telling it to fill just one led. (v2) Note that this is a pretty silly way to set one pixel, but it lets us illustrate the existence of fill_solid, a new convenience function the library provides.

fill_solid( &(leds[i]), 1 /*number of leds*/, CRGB( 255, 68, 221) )

For your case, you want to change the color of all LEDS, so you would call:

fill_solid(leds, NUM_OF_LEDS, CRGB::Red);

To turn them back off, you would change the color to CRGB::Black

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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