#include <FastLED.h>
const int NUM_LEDS = 30;
const int DATA_PIN = 6;
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
FastLED.setMaxPowerInVoltsAndMilliamps(5,400);
FastLED.setBrightness(8);
pinMode(2, INPUT_PULLUP);
}
void loop() {
for (int repeat=0; repeat<2; repeat++){
for (int repeat=0; repeat<4; repeat++){
for (int light=0; light<30; light++){
if ((light % 2) == 0){
leds[light] = CRGB :: Red;
} else {
leds[light] = CRGB :: Green;
}
}
FastLED.show();
delay(350);
for (int light=0; light<30; light++){
if ((light % 2) == 0){
leds[light] = CRGB :: Green;
} else {
leds[light] = CRGB :: Red;
}
}
FastLED.show();
delay(150);
for (int light=0; light<30; light++){
if ((light % 2) == 0){
leds[light] = CRGB :: Red;
} else {
leds[light] = CRGB :: Green;
}
}
FastLED.show();
delay(150);
for (int light=0; light<30; light++){
leds[light].setRGB(255, 0, 136);
}
FastLED.show();
delay(350);
}
//long lights
for (int repeat = 0; repeat<2; repeat++){
for (int light=0; light<15; light++){
leds[light] = CRGB :: Red;
leds[29 - light] = CRGB :: Green;
FastLED.show();
delay(66);
}
for (int light=0; light<15; light++){
leds[light] = CRGB :: Blue;
leds[29 - light] = CRGB :: Orange;
FastLED.show();
delay(66);
}
}
delay(50);
}
for (int light=0; light<30; light++){
leds[light] = CRGB :: White;
}
FastLED.show();
delay(500);
for (int light=0; light<30; light++){
leds[light] = CRGB :: Red;
}
FastLED.show();
delay(125);
for (int light=0; light<30; light++){
leds[light] = CRGB :: Green;
}
FastLED.show();
delay(125);
for (int light=0; light<30; light++){
leds[light] = CRGB :: Red;
}
FastLED.show();
delay(125);
for (int light=0; light<30; light++){
leds[light] = CRGB :: Green;
}
FastLED.show();
delay(125);
}