I am wanting to delay the fade time between two different colours using WS2812B leds, this is what I have so far which is working fine
#include <FastLED.h>
#define LED_PIN 11
#define NUM_LEDS 18
CRGB leds[NUM_LEDS];
int fadeAmount = 15;
int brightness = 0;
void setup() {
FastLED.addLeds<WS2812B, LED_PIN, GRB>(leds, NUM_LEDS);
}
void loop() {
brightness = brightness + fadeAmount;
if(brightness == 0 || brightness == 255)
{
fadeAmount = -fadeAmount;
}
for(int i=0;i<17;i++){
leds[i] = CRGB(0, 255, 60);
leds[i].fadeLightBy(brightness);
FastLED.show();
delay(100);
}
for(int i=0;i<17;i++){
leds[i] = CRGB(0, 0, 255);
leds[i].fadeLightBy(brightness);
FastLED.show();
delay(100);
}
}