#include <Adafruit_NeoPixel.h>
#define LED_PIN 3
#define LED_COUNT 54
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
int selector = 0;
int p0[] = {54};
const int p0Length = 1;
int p1[] = {5,5,44};
const int p1Length = 3;
int p2[] = {2,12,17,4,18};
const int p2Length = 5;
int p3[] = {0,15,15,6,18};
const int p3Length = 5;
int p4[] = {0,15,14,8,10,3};
const int p4Length = 6;
int p5[] = {0,15,13,10,8,5};
const int p5Length = 6;
int ledState[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
void setup() {
strip.begin();
strip.show();
strip.setBrightness(255);
}
void loop() {
loadPhase(p2, p2Length);
for(int a = 0; a<strip.numPixels(); a++){
if(ledState[a] == 1){
strip.setPixelColor(a, 255, 0, 0);
}
}
strip.show();
delay(1000);
}
void loadPhase(int phaseArray[], int arrayLength){
for(int a = 0; a <= arrayLength; a++){
for(int b = 0; b< phaseArray[a]; b++){
if(a%2 == 1){ledState[selector] = 1;}
else{ledState[selector] = 0;}
selector++;
}
}
selector = 0;
};