So I understand how to light up a single pixel using the leds[0] =

So I understand how to light up a single pixel using the leds[0] = CRGB::COLOR; command. But what about the whole strip? Without writing each LED 1 by 1

I keep going back to doc on github but I don’t see anything… Maybe I’m missing it?

Thanks in advance and sorry for a basic question… Im really trying to move away from example code and work to build my own stuff.

The easiest way is probably to do this:

fill_solid(leds, NUM_LEDS, CRGB::COLOR);

As long as leds is an array of all your leds, and NUM_LEDS is equal to the total number of leds, that will do the trick nicely.

Dave’s exactly right; that’s the simplest way to do it if you want to fill the leds[] array.

If you just want to show a particular color on the whole strip but NOT change what’s in the leds[] array, you can do this:
FastLED.show( CRGB::Blue );

That sends the one color out to all the LEDs without changing the in-memory leds[] array at all.

I use this as a button-push confirmation sometimes:
// flash to acknowledge button push:
FastLED.show( CRGB::Green );
// wait 1/5th second
FastLED.delay( 200 );
// go back to displaying whatever was
// already there:
FastLED.show( );

You can of course use a loop, too.

for( int i=0; i<NUM_LEDS; i++) {
leds[i] = CRGB::Pink;
}

This is basically what fill_solid does.

That’s a handy feature Mark! I didn’t realize that doing that would leave the LED array alone. :slight_smile:

The other thing I sometimes use it for is in blacking out the strip at startup just to make sure it’s not killing me on power consumption. Sometimes it even works!

Thanks guys! I appreciate it!!

My leds are just coming on white. Am I missing something?

#include “FastLED.h”
#define NUM_LEDS 19
#define DATA_PIN 1
CRGB leds[NUM_LEDS];

void setup() {
FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS);
}

void loop() {
FastLED.show( CRGB::Green );
delay(3000);
}

You have my LED Synth since May. I want information and my hoop back. This is a scumbag business you’re running and am not afraid to seek legal recourse.

Hi Katie-I think you may have posted in the wrong forum? This one is discussion of the open source FastLED Arduino library. Hope you get the gear you’re missing back again!