#define PATS 5
#define LED_P 16
#define NUM_LEDS LED_P*PATS
#define LED_PIN 7
#include <FastLED.h>
CRGB leds[NUM_LEDS];
boolean f=false;
void setup() {
FastLED.addLeds<WS2812, LED_PIN, GRB>(leds, NUM_LEDS).setCorrection(TypicalSMD5050);
FastLED.setBrightness(255);
}
void loop() {
for (int i=0;i<PATS;i++)
{
for (int br=0;br<256;br++)
{
for (int j=0;j<LED_P;j++)
{
leds[j+i*LED_P]=CRGB(br,0,0);
if (i>0) leds[j+(i-1)*LED_P]=CRGB(255-br,0,0);
else
if (f) leds[j+(PATS-1)*LED_P]=CRGB(255-br,0,0);
}
FastLED.show();
}
}
f=true;
}