Fast.LED.clear command strange results with delay

I'm using the Fast.LED library to control a string of 50 LEDS. My very simple test code is shown below. I expected the LEDs to all go off and be off for 1.5 seconds due to the delay command after the FastLED.clear command. However, the LEDs remain lit for the 1.5 second delay, then go off and the fill loop starts again immediately. I've tried putting in two clear commands followed by delay commands. Then the LEDs still remain lit until the end of the combined delays and the fill sequence starts immediately. It behaves as if the delay command is before the clear command instead of after.

#include "FastLED.h"

#define NUM_LEDS 50        //How many leds in your strip?
#define DATA_PIN 5         //Arduino board pin used for led strip data

CRGB leds[NUM_LEDS];      // Define the array of leds

void setup() { 
  LEDS.addLeds<WS2811,DATA_PIN,RGB>(leds,NUM_LEDS);  //Set up the LED string
 }

void loop() {                       //This is the main program loop
  CRGB color = CRGB::Red;
  LEDS.setBrightness (50);
      for( int i = 0; i < NUM_LEDS; i++) {
        leds[i] = color;
        delay(60);
        FastLED.show();
      } 
    FastLED.clear();                    //Turn off all LEDs
    delay (1500);
  
} //====================== END void loop =================================

Don't you mean 'LEDS.clear()' ?

    FastLED.clear();
    FastLED.show();
    delay (1500);

aarg:
Don't you mean 'LEDS.clear()' ?

LEDS is a pre-processor define (in FastLED.h) which will be replaced as FastLED.

#define LEDS FastLED

So LEDS.show(); is exactly the same as fastLED.show();

I feel so dumb. Putting the FastLED.show command after the FastLED.clear fixed it. Thanks!!

jwente49:
I feel so dumb. Putting the FastLED.show command after the FastLED.clear fixed it. Thanks!!

Not so dumb, but it helps to grasp that nothing happens until the .show is executed.