This is my code. It started to run correctly and now after no changes it wont run
#include <FastLED.h>
#define NUM_STRIPS 46
int NUM_LEDS_PER_STRIP[NUM_STRIPS] = {95, 25, 50, 15, 105, 20, 50, 35, 60, 30, 20, 50, 70, 35, 25, 25, 10, 35, 215, 10, 45, 25, 25, 10, 70, 10, 45, 45, 70, 35, 35, 10, 10, 10, 65, 20, 50, 10, 10, 10, 80, 20, 50, 10, 50, 3};
CRGB* leds[NUM_STRIPS];
#define COLOR_ORDER RGB
//array of modules
#define NUM_STRIPS2 12
int NUM_LEDS_PER_STRIP2[NUM_STRIPS2] = {19, 5, 9, 7, 7, 7, 7, 12, 7, 7, 7, 7};
CRGB* leds2[NUM_STRIPS2];
#define COLOR_ORDER2 RGB
#define NUM_STRIPS3 8
int NUM_leds_PER_STRIPS3[NUM_STRIPS3] = {3, 3, 3, 3, 3, 3, 3, 3};
CRGB* leds3[NUM_STRIPS3];
#define COLOR_ORDER3 RGB
//valve button pin
int buttonPin = 2;
int buttonOld = 0;
int buttonNew;
//push button to begin process
int startPin = 3;
int startOld = 0;
int startNew;
//compare states for startpin
int startState = 0;
int laststartState = 0;
// Initialize the button press counter
int buttonPressCount = 0;
// compare states for valve button
int buttonState = 0;
int lastButtonState = 0;
unsigned long currentMillis;
unsigned long startMillis;
unsigned long int newMillis;
unsigned int i;
const unsigned long period = 10000;
const int num_of_steps = 21;
int count=0;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
currentMillis = millis();
i=1;
leds[0] = new CRGB[NUM_LEDS_PER_STRIP[0]];
FastLED.addLeds<WS2812, 22>(leds[0], NUM_LEDS_PER_STRIP[0]);
leds[1] = new CRGB[NUM_LEDS_PER_STRIP[1]];
FastLED.addLeds<WS2812, 23>(leds[1], NUM_LEDS_PER_STRIP[1]);
leds[2] = new CRGB[NUM_LEDS_PER_STRIP[2]];
FastLED.addLeds<WS2812, 24>(leds[2], NUM_LEDS_PER_STRIP[2]);
leds[3] = new CRGB[NUM_LEDS_PER_STRIP[3]];
FastLED.addLeds<WS2812, 25>(leds[3], NUM_LEDS_PER_STRIP[3]);
leds[4] = new CRGB[NUM_LEDS_PER_STRIP[4]];
FastLED.addLeds<WS2812, 26>(leds[4], NUM_LEDS_PER_STRIP[4]);
leds[5] = new CRGB[NUM_LEDS_PER_STRIP[5]];
FastLED.addLeds<WS2812, 27>(leds[5], NUM_LEDS_PER_STRIP[5]);
leds[6] = new CRGB[NUM_LEDS_PER_STRIP[6]];
FastLED.addLeds<WS2812, 28>(leds[6], NUM_LEDS_PER_STRIP[6]);
leds[7] = new CRGB[NUM_LEDS_PER_STRIP[7]];
FastLED.addLeds<WS2812, 29>(leds[7], NUM_LEDS_PER_STRIP[7]);
leds[8] = new CRGB[NUM_LEDS_PER_STRIP[8]];
FastLED.addLeds<WS2812, 30>(leds[8], NUM_LEDS_PER_STRIP[8]);
leds[9] = new CRGB[NUM_LEDS_PER_STRIP[9]];
FastLED.addLeds<WS2812, 31>(leds[9], NUM_LEDS_PER_STRIP[9]);
leds[10] = new CRGB[NUM_LEDS_PER_STRIP[10]];
FastLED.addLeds<WS2812, 32>(leds[10], NUM_LEDS_PER_STRIP[10]);
leds[11] = new CRGB[NUM_LEDS_PER_STRIP[11]];
FastLED.addLeds<WS2812, 33>(leds[11], NUM_LEDS_PER_STRIP[11]);
leds[12] = new CRGB[NUM_LEDS_PER_STRIP[12]];
FastLED.addLeds<WS2812, 34>(leds[12], NUM_LEDS_PER_STRIP[12]);
leds[13] = new CRGB[NUM_LEDS_PER_STRIP[13]];
FastLED.addLeds<WS2812, 35>(leds[13], NUM_LEDS_PER_STRIP[13]);
leds[14] = new CRGB[NUM_LEDS_PER_STRIP[14]];
FastLED.addLeds<WS2812, 36>(leds[14], NUM_LEDS_PER_STRIP[14]);
leds[15] = new CRGB[NUM_LEDS_PER_STRIP[15]];
FastLED.addLeds<WS2812, 37>(leds[15], NUM_LEDS_PER_STRIP[15]);
leds[16] = new CRGB[NUM_LEDS_PER_STRIP[16]];
FastLED.addLeds<WS2812, 38>(leds[16], NUM_LEDS_PER_STRIP[16]);
leds2[0] = new CRGB[NUM_LEDS_PER_STRIP2[0]];
FastLED.addLeds<WS2812, 39>(leds[0], NUM_LEDS_PER_STRIP2[0]);
leds2[1] = new CRGB[NUM_LEDS_PER_STRIP2[1]];
FastLED.addLeds<WS2812, 40>(leds[0], NUM_LEDS_PER_STRIP2[0]);
leds2[2] = new CRGB[NUM_LEDS_PER_STRIP2[2]];
FastLED.addLeds<WS2812, 41>(leds[0], NUM_LEDS_PER_STRIP2[0]);
leds2[3] = new CRGB[NUM_LEDS_PER_STRIP2[3]];
FastLED.addLeds<WS2812, 42>(leds[0], NUM_LEDS_PER_STRIP2[0]);
leds2[4] = new CRGB[NUM_LEDS_PER_STRIP2[4]];
FastLED.addLeds<WS2812, 43>(leds[0], NUM_LEDS_PER_STRIP2[0]);
leds2[5] = new CRGB[NUM_LEDS_PER_STRIP2[5]];
FastLED.addLeds<WS2812, 44>(leds[0], NUM_LEDS_PER_STRIP2[0]);
leds2[6] = new CRGB[NUM_LEDS_PER_STRIP2[6]];
FastLED.addLeds<WS2812, 45>(leds[0], NUM_LEDS_PER_STRIP2[0]);
leds2[7] = new CRGB[NUM_LEDS_PER_STRIP2[7]];
FastLED.addLeds<WS2812, 46>(leds[0], NUM_LEDS_PER_STRIP2[0]);
leds2[8] = new CRGB[NUM_LEDS_PER_STRIP2[8]];
FastLED.addLeds<WS2812, 47>(leds[8], NUM_LEDS_PER_STRIP2[8]);
leds3[0] = new CRGB[NUM_leds_PER_STRIPS3[0]];
FastLED.addLeds<WS2812, 48>(leds3[0],NUM_leds_PER_STRIPS3[0]);
leds3[1] = new CRGB[NUM_leds_PER_STRIPS3[1]];
FastLED.addLeds<WS2812, 49>(leds3[1],NUM_leds_PER_STRIPS3[1]);
leds3[2] = new CRGB[NUM_leds_PER_STRIPS3[2]];
FastLED.addLeds<WS2812, 50>(leds3[2],NUM_leds_PER_STRIPS3[2]);
leds3[3] = new CRGB[NUM_leds_PER_STRIPS3[3]];
FastLED.addLeds<WS2812, 51>(leds3[3],NUM_leds_PER_STRIPS3[3]);
leds3[4] = new CRGB[NUM_leds_PER_STRIPS3[4]];
FastLED.addLeds<WS2812, 52>(leds3[4],NUM_leds_PER_STRIPS3[4]);
leds3[5] = new CRGB[NUM_leds_PER_STRIPS3[5]];
FastLED.addLeds<WS2812, 53>(leds3[5],NUM_leds_PER_STRIPS3[5]);
leds3[6] = new CRGB[NUM_leds_PER_STRIPS3[6]];
FastLED.addLeds<WS2812, 6>(leds3[6],NUM_leds_PER_STRIPS3[6]);
leds3[7] = new CRGB[NUM_leds_PER_STRIPS3[7]];
FastLED.addLeds<WS2812, 7>(leds3[7],NUM_leds_PER_STRIPS3[7]);
fill_solid(leds3[0], NUM_leds_PER_STRIPS3[0], CRGB::Red);
fill_solid(leds3[1], NUM_leds_PER_STRIPS3[1], CRGB::Red);
fill_solid(leds3[2], NUM_leds_PER_STRIPS3[2], CRGB::Red);
fill_solid(leds3[3], NUM_leds_PER_STRIPS3[3], CRGB::Red);
fill_solid(leds3[4], NUM_leds_PER_STRIPS3[4], CRGB::Red);
fill_solid(leds3[5], NUM_leds_PER_STRIPS3[5], CRGB::Red);
fill_solid(leds3[6], NUM_leds_PER_STRIPS3[6], CRGB::Red);
fill_solid(leds3[7], NUM_leds_PER_STRIPS3[7], CRGB::Red);
//HEX as orange
fill_solid(leds2[8], NUM_LEDS_PER_STRIP2[8], CRGB::Orange);
FastLED.show();
pinMode(buttonPin, INPUT);
pinMode(startPin, INPUT);
}
void loop() {
buttonState = digitalRead(buttonPin);
startState = digitalRead(startPin);
count++;
//push button to begin loop
if (startOld == 0 && startNew == 1) {
// Compare the buttonState to its previous state
if (buttonState != lastButtonState) {
// If the state has changed, increment the buttonPressCount if it is high
if (buttonState == HIGH) {
buttonPressCount++;
}
// Delay a little bit to avoid bouncing
delay(50);
}
// Save the current state as the last state, for the next loop iteration
lastButtonState = buttonState;
//leds 0 illuminate
while (i <= num_of_steps){
if (i==1){
for(int j = 0; j < NUM_LEDS_PER_STRIP[0]; j++) {
leds[0][j] = CRGB(30, 16, 0);
FastLED.show();
}
newMillis = millis();
if (newMillis - currentMillis > period){
i++;
currentMillis = millis();
}
}
//valvesubroutine + leds 0 and 2 illuminate
if (i==2){
fill_solid(leds[0], NUM_LEDS_PER_STRIP[0],CRGB(30, 16, 0));
if (buttonPressCount==1){
fill_solid(leds3[0], NUM_leds_PER_STRIPS3[0], CRGB::Green);
}
for(int j = 0; j < NUM_LEDS_PER_STRIP[2]; j++) {
leds[2][j] = CRGB(30, 16, 0);
FastLED.show();
delay(100);
newMillis = millis();
if (newMillis - currentMillis > period){
i++;
currentMillis = millis();
}
}
//leds 0, 2, and 3 illluminate
if (i==3){
fill_solid(leds[0], NUM_LEDS_PER_STRIP[0],CRGB(30, 16, 0));
fill_solid(leds[2], NUM_LEDS_PER_STRIP[2], CRGB(30, 16, 0));
for(int j = 0; j < NUM_LEDS_PER_STRIP[3]; j++) {
leds[3][j] = CRGB(30, 16, 0);
FastLED.show();
delay(100);
}
newMillis = millis();
if (newMillis - currentMillis > period){
i++;
currentMillis = millis();
}
}
//leds 0, 2, and 3 illluminate + FLT-1 run normally
if (i==4){
fill_solid(leds[0], NUM_LEDS_PER_STRIP[0], CRGB(30, 16, 0));
fill_solid(leds[2], NUM_LEDS_PER_STRIP[2], CRGB(30, 16, 0));
fill_solid(leds[3], NUM_LEDS_PER_STRIP[3], CRGB(30, 16, 0));
for(int j = 0; j < NUM_LEDS_PER_STRIP2[0]; j++) {
leds2[0][j] = CRGB(30, 16, 0);
FastLED.show();
}
newMillis = millis();
if (newMillis - currentMillis > period){
i++;
currentMillis = millis();
}
}
//leds 0, 2, 3, FLT-1, and 4 illuminate
if (i==5){
fill_solid(leds[0], NUM_LEDS_PER_STRIP[0], CRGB(30, 16, 0));
fill_solid(leds[2], NUM_LEDS_PER_STRIP[2], CRGB(30, 16, 0));
fill_solid(leds[3], NUM_LEDS_PER_STRIP[3], CRGB(30, 16, 0));
fill_solid(leds2[0], NUM_LEDS_PER_STRIP2[0], CRGB(30, 16, 0));
for(int j = 0; j < NUM_LEDS_PER_STRIP[4]; j++) {
leds[4][j] = CRGB(30, 16, 0);
FastLED.show();
delay(100);
}
newMillis = millis();
if (newMillis - currentMillis > period){
i++;
currentMillis = millis();
}
}
//valvesubroutine + leds 0, 2, 3, FLT-1, 4, and 5 illuminate
if (i==6){
fill_solid(leds[0], NUM_LEDS_PER_STRIP[0], CRGB(30, 16, 0));
fill_solid(leds[2], NUM_LEDS_PER_STRIP[2], CRGB(30, 16, 0));
fill_solid(leds[3], NUM_LEDS_PER_STRIP[3], CRGB(30, 16, 0));
fill_solid(leds2[0], NUM_LEDS_PER_STRIP2[0], CRGB(30, 16, 0));
fill_solid(leds[4], NUM_LEDS_PER_STRIP[4], CRGB(30, 16, 0));
if (buttonPressCount==2){
fill_solid(leds3[2], NUM_leds_PER_STRIPS3[2], CRGB::Green);
}
for(int j = 0; j < NUM_LEDS_PER_STRIP[5]; j++) {
leds[5][j] = CRGB(30, 16, 0);
FastLED.show();
delay(100);
}
newMillis = millis();
if (newMillis - currentMillis > period){
i++;
currentMillis = millis();
}
}
//leds 0, 2, 3, FLT-1, 4, and 5 illuminate + PSA-1 run normally
if (i==7){
fill_solid(leds[0], NUM_LEDS_PER_STRIP[0], CRGB(30, 16, 0));
fill_solid(leds[2], NUM_LEDS_PER_STRIP[2], CRGB(30, 16, 0));
fill_solid(leds[3], NUM_LEDS_PER_STRIP[3], CRGB(30, 16, 0));
fill_solid(leds2[0], NUM_LEDS_PER_STRIP2[0], CRGB(30, 16, 0));
fill_solid(leds[4], NUM_LEDS_PER_STRIP[4], CRGB(30, 16, 0));
fill_solid(leds[5], NUM_LEDS_PER_STRIP[5], CRGB(30, 16, 0));
for(int j = 0; j < NUM_LEDS_PER_STRIP2[1]; j++) {
leds2[1][j] = CRGB(30, 16, 0);
FastLED.show();
}
newMillis = millis();
if (newMillis - currentMillis > period){
i++;
currentMillis = millis();
}
}
//leds 0, 2, 3, FLT-1, 4, 5, PSA-1, and 6 illuminate
if (i==8){
fill_solid(leds[0], NUM_LEDS_PER_STRIP[0], CRGB(30, 16, 0));
fill_solid(leds[2], NUM_LEDS_PER_STRIP[2], CRGB(30, 16, 0));
fill_solid(leds[3], NUM_LEDS_PER_STRIP[3], CRGB(30, 16, 0));
fill_solid(leds2[0], NUM_LEDS_PER_STRIP2[0], CRGB(30, 16, 0));
fill_solid(leds[4], NUM_LEDS_PER_STRIP[4], CRGB(30, 16, 0));
fill_solid(leds[5], NUM_LEDS_PER_STRIP[5], CRGB(30, 16, 0));
fill_solid(leds2[1], NUM_LEDS_PER_STRIP2[1], CRGB(30, 16, 0));
for(int j = 0; j < NUM_LEDS_PER_STRIP[6]; j++) {
leds[6][j] = CRGB(30, 16, 0);
FastLED.show();
delay(100);
}
newMillis = millis();
if (newMillis - currentMillis > period){
i++;
currentMillis = millis();
}
}
//valvesubroutine + leds 0, 2, 3, FLT-1, 4, 5, PSA-1, 6, and 7 illuminate
if (i==9){
fill_solid(leds[0], NUM_LEDS_PER_STRIP[0], CRGB(30, 16, 0));
fill_solid(leds[2], NUM_LEDS_PER_STRIP[2], CRGB(30, 16, 0));
fill_solid(leds[3], NUM_LEDS_PER_STRIP[3], CRGB(30, 16, 0));
fill_solid(leds2[0], NUM_LEDS_PER_STRIP2[0], CRGB(30, 16, 0));
fill_solid(leds[4], NUM_LEDS_PER_STRIP[4], CRGB(30, 16, 0));
fill_solid(leds[5], NUM_LEDS_PER_STRIP[5], CRGB(30, 16, 0));
fill_solid(leds2[1], NUM_LEDS_PER_STRIP2[1], CRGB(30, 16, 0));
fill_solid(leds[6], NUM_LEDS_PER_STRIP[6], CRGB(30, 16, 0));
if (buttonPressCount==3){
fill_solid(leds3[3], NUM_leds_PER_STRIPS3[3], CRGB::Green);
}
for(int j = 0; j < NUM_LEDS_PER_STRIP[7]; j++) {
leds[7][j] = CRGB(30, 16, 0);
FastLED.show();
delay(100);
}
newMillis = millis();
if (newMillis - currentMillis > period){
i++;
currentMillis = millis();
}
}
//leds 0, 2, 3, FLT-1, 4, 5, PSA-1, 6, and 7 illuminate + ACT-1 run normally
if (i==10){
fill_solid(leds[0], NUM_LEDS_PER_STRIP[0], CRGB(30, 16, 0));
fill_solid(leds[2], NUM_LEDS_PER_STRIP[2], CRGB(30, 16, 0));
fill_solid(leds[3], NUM_LEDS_PER_STRIP[3], CRGB(30, 16, 0));
fill_solid(leds2[0], NUM_LEDS_PER_STRIP2[0], CRGB(30, 16, 0));
fill_solid(leds[4], NUM_LEDS_PER_STRIP[4], CRGB(30, 16, 0));
fill_solid(leds[5], NUM_LEDS_PER_STRIP[5], CRGB(30, 16, 0));
fill_solid(leds2[1], NUM_LEDS_PER_STRIP2[1], CRGB(30, 16, 0));
fill_solid(leds[6], NUM_LEDS_PER_STRIP[6], CRGB(30, 16, 0));
fill_solid(leds[7], NUM_LEDS_PER_STRIP[7], CRGB(30, 16, 0));
for(int j = 0; j < NUM_LEDS_PER_STRIP2[2]; j++) {
leds2[2][j] = CRGB(30, 16, 0);
FastLED.show();
}
newMillis = millis();
if (newMillis - currentMillis > period){
i++;
currentMillis = millis();
}
}
//leds 0, 2, 3, FLT-1, 4, 5, PSA-1, 6, 7, ACT-1, and 8 illuminate
if (i==11){
fill_solid(leds[0], NUM_LEDS_PER_STRIP[0], CRGB(30, 16, 0));
fill_solid(leds[2], NUM_LEDS_PER_STRIP[2], CRGB(30, 16, 0));
fill_solid(leds[3], NUM_LEDS_PER_STRIP[3], CRGB(30, 16, 0));
fill_solid(leds2[0], NUM_LEDS_PER_STRIP2[0], CRGB(30, 16, 0));
fill_solid(leds[4], NUM_LEDS_PER_STRIP[4], CRGB(30, 16, 0));
fill_solid(leds[5], NUM_LEDS_PER_STRIP[5], CRGB(30, 16, 0));
fill_solid(leds2[1], NUM_LEDS_PER_STRIP2[1], CRGB(30, 16, 0));
fill_solid(leds[6], NUM_LEDS_PER_STRIP[6], CRGB(30, 16, 0));
fill_solid(leds[7], NUM_LEDS_PER_STRIP[7], CRGB(30, 16, 0));
fill_solid(leds2[2], NUM_LEDS_PER_STRIP2[2], CRGB(30, 16, 0));
for(int j = 0; j < NUM_LEDS_PER_STRIP[8]; j++) {
leds[8][j] = CRGB(30, 16, 0);
FastLED.show();
delay(100);
}
newMillis = millis();
if (newMillis - currentMillis > period){
i++;
currentMillis = millis();
}
}
//leds 0, 2, 3, FLT-1, 4, 5, PSA-1, 6, 7, ACT-1, and 8 illuminate + FLT-2 run normally
if (i==12){
fill_solid(leds[0], NUM_LEDS_PER_STRIP[0], CRGB(30, 16, 0));
fill_solid(leds[2], NUM_LEDS_PER_STRIP[2], CRGB(30, 16, 0));
fill_solid(leds[3], NUM_LEDS_PER_STRIP[3], CRGB(30, 16, 0));
fill_solid(leds2[0], NUM_LEDS_PER_STRIP2[0], CRGB(30, 16, 0));
fill_solid(leds[4], NUM_LEDS_PER_STRIP[4], CRGB(30, 16, 0));
fill_solid(leds[5], NUM_LEDS_PER_STRIP[5], CRGB(30, 16, 0));
fill_solid(leds2[1], NUM_LEDS_PER_STRIP2[1], CRGB(30, 16, 0));
fill_solid(leds[6], NUM_LEDS_PER_STRIP[6], CRGB(30, 16, 0));
fill_solid(leds[7], NUM_LEDS_PER_STRIP[7], CRGB(30, 16, 0));
fill_solid(leds2[2], NUM_LEDS_PER_STRIP2[2], CRGB(30, 16, 0));
fill_solid(leds[8], NUM_LEDS_PER_STRIP[8], CRGB(30, 16, 0));
for(int j = 0; j < NUM_LEDS_PER_STRIP2[3]; j++) {
leds2[3][j] = CRGB(30, 16, 0);
FastLED.show();
}
newMillis = millis();
if (newMillis - currentMillis > period){
i++;
currentMillis = millis();
}
}
//leds 0, 2, 3, FLT-1, 4, 5, PSA-1, 6, 7, ACT-1, 8, FLT-2, and 9 illuminate
if (i==13){
fill_solid(leds[0], NUM_LEDS_PER_STRIP[0], CRGB(30, 16, 0));
fill_solid(leds[2], NUM_LEDS_PER_STRIP[2], CRGB(30, 16, 0));
fill_solid(leds[3], NUM_LEDS_PER_STRIP[3], CRGB(30, 16, 0));
fill_solid(leds2[0], NUM_LEDS_PER_STRIP2[0], CRGB(30, 16, 0));
fill_solid(leds[4], NUM_LEDS_PER_STRIP[4], CRGB(30, 16, 0));
fill_solid(leds[5], NUM_LEDS_PER_STRIP[5], CRGB(30, 16, 0));
fill_solid(leds2[1], NUM_LEDS_PER_STRIP2[1], CRGB(30, 16, 0));
fill_solid(leds[6], NUM_LEDS_PER_STRIP[6], CRGB(30, 16, 0));
fill_solid(leds[7], NUM_LEDS_PER_STRIP[7], CRGB(30, 16, 0));
fill_solid(leds2[2], NUM_LEDS_PER_STRIP2[2], CRGB(30, 16, 0));
fill_solid(leds[8], NUM_LEDS_PER_STRIP[8], CRGB(30, 16, 0));
fill_solid(leds2[3], NUM_LEDS_PER_STRIP2[3], CRGB(30, 16, 0));
for(int j = 0; j < NUM_LEDS_PER_STRIP[9]; j++) {
leds[9][j] = CRGB(30, 16, 0);
FastLED.show();
delay(100);
}
newMillis = millis();
if (newMillis - currentMillis > period){
i++;
currentMillis = millis();
}
}
//valvesubroutine + leds 0, 2, 3, FLT-1, 4, 5, PSA-1, 6, 7, ACT-1, 8, FLT-2, 9, and 11 illuminate
if (i==14){
fill_solid(leds[0], NUM_LEDS_PER_STRIP[0], CRGB(30, 16, 0));
fill_solid(leds[2], NUM_LEDS_PER_STRIP[2], CRGB(30, 16, 0));
fill_solid(leds[3], NUM_LEDS_PER_STRIP[3], CRGB(30, 16, 0));
fill_solid(leds2[0], NUM_LEDS_PER_STRIP2[0], CRGB(30, 16, 0));
fill_solid(leds[4], NUM_LEDS_PER_STRIP[4], CRGB(30, 16, 0));
fill_solid(leds[5], NUM_LEDS_PER_STRIP[5], CRGB(30, 16, 0));
fill_solid(leds2[1], NUM_LEDS_PER_STRIP2[1], CRGB(30, 16, 0));
fill_solid(leds[6], NUM_LEDS_PER_STRIP[6], CRGB(30, 16, 0));
fill_solid(leds[7], NUM_LEDS_PER_STRIP[7], CRGB(30, 16, 0));
fill_solid(leds2[2], NUM_LEDS_PER_STRIP2[2], CRGB(30, 16, 0));
fill_solid(leds[8], NUM_LEDS_PER_STRIP[8], CRGB(30, 16, 0));
fill_solid(leds2[3], NUM_LEDS_PER_STRIP2[3], CRGB(30, 16, 0));
fill_solid(leds[9], NUM_LEDS_PER_STRIP[9], CRGB(30, 16, 0));
if (buttonPressCount==4){
fill_solid(leds3[5], NUM_leds_PER_STRIPS3[5], CRGB::Green);
}
for(int j = 0; j < NUM_LEDS_PER_STRIP[11]; j++) {
leds[11][j] = CRGB(30, 16, 0);
FastLED.show();
delay(100);
}
newMillis = millis();
if (newMillis - currentMillis > period){
i++;
currentMillis = millis();
}
}
//leds 0, 2, 3, FLT-1, 4, 5, PSA-1, 6, 7, ACT-1, 8, FLT-2, 9, 11, and 12 illuminate
if (i==15){
fill_solid(leds[0], NUM_LEDS_PER_STRIP[0], CRGB(30, 16, 0));
fill_solid(leds[2], NUM_LEDS_PER_STRIP[2], CRGB(30, 16, 0));
fill_solid(leds[3], NUM_LEDS_PER_STRIP[3], CRGB(30, 16, 0));
fill_solid(leds2[0], NUM_LEDS_PER_STRIP2[0], CRGB(30, 16, 0));
fill_solid(leds[4], NUM_LEDS_PER_STRIP[4], CRGB(30, 16, 0));
fill_solid(leds[5], NUM_LEDS_PER_STRIP[5], CRGB(30, 16, 0));
fill_solid(leds2[1], NUM_LEDS_PER_STRIP2[1], CRGB(30, 16, 0));
fill_solid(leds[6], NUM_LEDS_PER_STRIP[6], CRGB(30, 16, 0));
fill_solid(leds[7], NUM_LEDS_PER_STRIP[7], CRGB(30, 16, 0));
fill_solid(leds2[2], NUM_LEDS_PER_STRIP2[2], CRGB(30, 16, 0));
fill_solid(leds[8], NUM_LEDS_PER_STRIP[8], CRGB(30, 16, 0));
fill_solid(leds2[3], NUM_LEDS_PER_STRIP2[3], CRGB(30, 16, 0));
fill_solid(leds[9], NUM_LEDS_PER_STRIP[12], CRGB(30, 16, 0));
fill_solid(leds[11], NUM_LEDS_PER_STRIP[11], CRGB(30, 16, 0));
for(int j = 0; j < NUM_LEDS_PER_STRIP[12]; j++) {
leds[12][j] = CRGB(30, 16, 0);
FastLED.show();
delay(100);
}
newMillis = millis();
if (newMillis - currentMillis > period){
i++;
currentMillis = millis();
}
}
//leds 0, 2, 3, FLT-1, 4, 5, PSA-1, 6, 7, ACT-1, 8, FLT-2, 9, 11, 12, and 17 illuminate
if (i==16){
fill_solid(leds[0], NUM_LEDS_PER_STRIP[0], CRGB(30, 16, 0));
fill_solid(leds[2], NUM_LEDS_PER_STRIP[2], CRGB(30, 16, 0));
fill_solid(leds[3], NUM_LEDS_PER_STRIP[3], CRGB(30, 16, 0));
fill_solid(leds2[0], NUM_LEDS_PER_STRIP2[0], CRGB(30, 16, 0));
fill_solid(leds[4], NUM_LEDS_PER_STRIP[4], CRGB(30, 16, 0));
fill_solid(leds[5], NUM_LEDS_PER_STRIP[5], CRGB(30, 16, 0));
fill_solid(leds2[1], NUM_LEDS_PER_STRIP2[1], CRGB(30, 16, 0));
fill_solid(leds[6], NUM_LEDS_PER_STRIP[6], CRGB(30, 16, 0));
fill_solid(leds[7], NUM_LEDS_PER_STRIP[7], CRGB(30, 16, 0));
fill_solid(leds2[2], NUM_LEDS_PER_STRIP2[2], CRGB(30, 16, 0));
fill_solid(leds[8], NUM_LEDS_PER_STRIP[8], CRGB(30, 16, 0));
fill_solid(leds2[3], NUM_LEDS_PER_STRIP2[3], CRGB(30, 16, 0));
fill_solid(leds[9], NUM_LEDS_PER_STRIP[9], CRGB(30, 16, 0));
fill_solid(leds[11], NUM_LEDS_PER_STRIP[11], CRGB(30, 16, 0));
fill_solid(leds[12], NUM_LEDS_PER_STRIP[12], CRGB(30, 16, 0));
for(int j = 0; j < NUM_LEDS_PER_STRIP[13]; j++) {
leds[13][j] = CRGB(30, 16, 0);
FastLED.show();
}
newMillis = millis();
if (newMillis - currentMillis > period){
i++;
currentMillis = millis();
}
}
//leds 0, 2, 3, FLT-1, 4, 5, PSA-1, 6, 7, ACT-1, 8, FLT-2, 9, 11, 12, 17, and 13 illuminate
if (i==17){
fill_solid(leds[0], NUM_LEDS_PER_STRIP[0], CRGB(30, 16, 0));
fill_solid(leds[2], NUM_LEDS_PER_STRIP[2], CRGB(30, 16, 0));
fill_solid(leds[3], NUM_LEDS_PER_STRIP[3], CRGB(30, 16, 0));
fill_solid(leds2[0], NUM_LEDS_PER_STRIP2[0], CRGB(30, 16, 0));
fill_solid(leds[4], NUM_LEDS_PER_STRIP[4], CRGB(30, 16, 0));
fill_solid(leds[5], NUM_LEDS_PER_STRIP[5], CRGB(30, 16, 0));
fill_solid(leds2[1], NUM_LEDS_PER_STRIP2[1], CRGB(30, 16, 0));
fill_solid(leds[6], NUM_LEDS_PER_STRIP[6], CRGB(30, 16, 0));
fill_solid(leds[7], NUM_LEDS_PER_STRIP[7], CRGB(30, 16, 0));
fill_solid(leds2[2], NUM_LEDS_PER_STRIP2[2], CRGB(30, 16, 0));
fill_solid(leds[8], NUM_LEDS_PER_STRIP[8], CRGB(30, 16, 0));
fill_solid(leds2[3], NUM_LEDS_PER_STRIP2[3], CRGB(30, 16, 0));
fill_solid(leds[9], NUM_LEDS_PER_STRIP[12], CRGB(30, 16, 0));
fill_solid(leds[11], NUM_LEDS_PER_STRIP[11], CRGB(30, 16, 0));
fill_solid(leds[12], NUM_LEDS_PER_STRIP[12], CRGB(30, 16, 0));
fill_solid(leds[13], NUM_LEDS_PER_STRIP[13], CRGB(30, 16, 0));
for(int j = 0; j < NUM_LEDS_PER_STRIP[17]; j++) {
leds[17][j] = CRGB(30, 16, 0);
FastLED.show();
}
newMillis = millis();
if (newMillis - currentMillis > period){
i++;
currentMillis = millis();
}
}
//leds 0, 2, 3, FLT-1, 4, 5, PSA-1, 6, 7, ACT-1, 8, FLT-2, 9, 11, 12, 13, 14 illuminate
if (i==18){
fill_solid(leds[0], NUM_LEDS_PER_STRIP[0], CRGB(30, 16, 0));
fill_solid(leds[2], NUM_LEDS_PER_STRIP[2], CRGB(30, 16, 0));
fill_solid(leds[3], NUM_LEDS_PER_STRIP[3], CRGB(30, 16, 0));
fill_solid(leds2[0], NUM_LEDS_PER_STRIP2[0], CRGB(30, 16, 0));
fill_solid(leds[4], NUM_LEDS_PER_STRIP[4],CRGB(30, 16, 0));
fill_solid(leds[5], NUM_LEDS_PER_STRIP[5], CRGB(30, 16, 0));
fill_solid(leds2[1], NUM_LEDS_PER_STRIP2[1], CRGB(30, 16, 0));
fill_solid(leds[6], NUM_LEDS_PER_STRIP[6], CRGB(30, 16, 0));
fill_solid(leds[7], NUM_LEDS_PER_STRIP[7], CRGB(30, 16, 0));
fill_solid(leds2[2], NUM_LEDS_PER_STRIP2[2], CRGB(30, 16, 0));
fill_solid(leds[8], NUM_LEDS_PER_STRIP[8], CRGB(30, 16, 0));
fill_solid(leds2[3], NUM_LEDS_PER_STRIP2[3], CRGB(30, 16, 0));
fill_solid(leds[9], NUM_LEDS_PER_STRIP[12], CRGB(30, 16, 0));
fill_solid(leds[11], NUM_LEDS_PER_STRIP[11], CRGB(30, 16, 0));
fill_solid(leds[12], NUM_LEDS_PER_STRIP[12], CRGB(30, 16, 0));
fill_solid(leds[13], NUM_LEDS_PER_STRIP[13], CRGB(30, 16, 0));
fill_solid(leds[17], NUM_LEDS_PER_STRIP[17], CRGB(30, 16, 0));
for(int j = 0; j < NUM_LEDS_PER_STRIP[14]; j++) {
leds[14][j] = CRGB(30, 16, 0);
FastLED.show();
}
newMillis = millis();
if (newMillis - currentMillis > period){
i++;
currentMillis = millis();
}
}
//leds 0, 2, 3, FLT-1, 4, 5, PSA-1, 6, 7, ACT-1, 8, FLT-2, 9, 11, 12, 13, 14, 15 illuminate
if (i==19){
fill_solid(leds[0], NUM_LEDS_PER_STRIP[0], CRGB(30, 16, 0));
fill_solid(leds[2], NUM_LEDS_PER_STRIP[2], CRGB(30, 16, 0));
fill_solid(leds[3], NUM_LEDS_PER_STRIP[3], CRGB(30, 16, 0));
fill_solid(leds2[0], NUM_LEDS_PER_STRIP2[0], CRGB(30, 16, 0));
fill_solid(leds[4], NUM_LEDS_PER_STRIP[4],CRGB(30, 16, 0));
fill_solid(leds[5], NUM_LEDS_PER_STRIP[5], CRGB(30, 16, 0));
fill_solid(leds2[1], NUM_LEDS_PER_STRIP2[1], CRGB(30, 16, 0));
fill_solid(leds[6], NUM_LEDS_PER_STRIP[6], CRGB(30, 16, 0));
fill_solid(leds[7], NUM_LEDS_PER_STRIP[7], CRGB(30, 16, 0));
fill_solid(leds2[2], NUM_LEDS_PER_STRIP2[2], CRGB(30, 16, 0));
fill_solid(leds[8], NUM_LEDS_PER_STRIP[8], CRGB(30, 16, 0));
fill_solid(leds2[3], NUM_LEDS_PER_STRIP2[3], CRGB(30, 16, 0));
fill_solid(leds[9], NUM_LEDS_PER_STRIP[12], CRGB(30, 16, 0));
fill_solid(leds[11], NUM_LEDS_PER_STRIP[11], CRGB(30, 16, 0));
fill_solid(leds[12], NUM_LEDS_PER_STRIP[12], CRGB(30, 16, 0));
fill_solid(leds[13], NUM_LEDS_PER_STRIP[13], CRGB(30, 16, 0));
fill_solid(leds[17], NUM_LEDS_PER_STRIP[17], CRGB(30, 16, 0));
fill_solid(leds[14], NUM_LEDS_PER_STRIP[14], CRGB(30, 16, 0));
fill_solid(leds2[4], NUM_LEDS_PER_STRIP2[4], CRGB(30, 16, 0));
fill_solid(leds2[5], NUM_LEDS_PER_STRIP2[5], CRGB(30, 16, 0));
for(int j = 0; j < NUM_LEDS_PER_STRIP[15]; j++) {
leds[15][j] = CRGB(30, 16, 0);
}
newMillis = millis();
if (newMillis - currentMillis > period){
i++;
currentMillis = millis();
}
}
//leds 0, 2, 3, FLT-1, 4, 5, PSA-1, 6, 7, ACT-1, 8, FLT-2, 9, 11, 12, 13, 14, 15, and MOD 1-1 and 1-2 illuminate
if (i==20){
fill_solid(leds[0], NUM_LEDS_PER_STRIP[0], CRGB(30, 16, 0));
fill_solid(leds[2], NUM_LEDS_PER_STRIP[2], CRGB(30, 16, 0));
fill_solid(leds[3], NUM_LEDS_PER_STRIP[3], CRGB(30, 16, 0));
fill_solid(leds2[0], NUM_LEDS_PER_STRIP2[0], CRGB(30, 16, 0));
fill_solid(leds[4], NUM_LEDS_PER_STRIP[4], CRGB(30, 16, 0));
fill_solid(leds[5], NUM_LEDS_PER_STRIP[5], CRGB(30, 16, 0));
fill_solid(leds2[1], NUM_LEDS_PER_STRIP2[1], CRGB(30, 16, 0));
fill_solid(leds[6], NUM_LEDS_PER_STRIP[6], CRGB(30, 16, 0));
fill_solid(leds[7], NUM_LEDS_PER_STRIP[7], CRGB(30, 16, 0));
fill_solid(leds2[2], NUM_LEDS_PER_STRIP2[2], CRGB(30, 16, 0));
fill_solid(leds[8], NUM_LEDS_PER_STRIP[8], CRGB(30, 16, 0));
fill_solid(leds2[3], NUM_LEDS_PER_STRIP2[3], CRGB(30, 16, 0));
fill_solid(leds[9], NUM_LEDS_PER_STRIP[12], CRGB(30, 16, 0));
fill_solid(leds[11], NUM_LEDS_PER_STRIP[11], CRGB(30, 16, 0));
fill_solid(leds[12], NUM_LEDS_PER_STRIP[12], CRGB(30, 16, 0));
fill_solid(leds[17], NUM_LEDS_PER_STRIP[13], CRGB(30, 16, 0));
fill_solid(leds[14], NUM_LEDS_PER_STRIP[14], CRGB(30, 16, 0));
fill_solid(leds[15], NUM_LEDS_PER_STRIP[15], CRGB(30, 16, 0));
for(int j = 0; j < NUM_LEDS_PER_STRIP2[4]; j++) {
leds2[4][j] = CRGB(30, 16, 0);
}
for(int j = 0; j < NUM_LEDS_PER_STRIP2[5]; j++) {
leds2[5][j] = CRGB(30, 16, 0);
FastLED.show();
newMillis = millis();
if (newMillis - currentMillis > period){
i++;
currentMillis = millis();
}
}
if (i==21){
fill_solid(leds[0], NUM_LEDS_PER_STRIP[0], CRGB(30, 16, 0));
fill_solid(leds[2], NUM_LEDS_PER_STRIP[2], CRGB(30, 16, 0));
fill_solid(leds[3], NUM_LEDS_PER_STRIP[3], CRGB(30, 16, 0));
fill_solid(leds2[0], NUM_LEDS_PER_STRIP2[0], CRGB(30, 16, 0));
fill_solid(leds[4], NUM_LEDS_PER_STRIP[4], CRGB(30, 16, 0));
fill_solid(leds[5], NUM_LEDS_PER_STRIP[5], CRGB(30, 16, 0));
fill_solid(leds2[1], NUM_LEDS_PER_STRIP2[1], CRGB(30, 16, 0));
fill_solid(leds[6], NUM_LEDS_PER_STRIP[6], CRGB(30, 16, 0));
fill_solid(leds[7], NUM_LEDS_PER_STRIP[7], CRGB(30, 16, 0));
fill_solid(leds2[2], NUM_LEDS_PER_STRIP2[2], CRGB(30, 16, 0));
fill_solid(leds[8], NUM_LEDS_PER_STRIP[8], CRGB(30, 16, 0));
fill_solid(leds2[3], NUM_LEDS_PER_STRIP2[3], CRGB(30, 16, 0));
fill_solid(leds[9], NUM_LEDS_PER_STRIP[12], CRGB(30, 16, 0));
fill_solid(leds[11], NUM_LEDS_PER_STRIP[11], CRGB(30, 16, 0));
fill_solid(leds[12], NUM_LEDS_PER_STRIP[12], CRGB(30, 16, 0));
fill_solid(leds[17], NUM_LEDS_PER_STRIP[13], CRGB(30, 16, 0));
fill_solid(leds[14], NUM_LEDS_PER_STRIP[14], CRGB(30, 16, 0));
fill_solid(leds[15], NUM_LEDS_PER_STRIP[15], CRGB(30, 16, 0));
fill_solid(leds2[4], NUM_LEDS_PER_STRIP2[4], CRGB(30, 16, 0));
fill_solid(leds2[5], NUM_LEDS_PER_STRIP2[5], CRGB(30, 16, 0));
for(int j = 0; j < NUM_LEDS_PER_STRIP[16]; j++) {
leds[16][j] = CRGB(30, 16, 0);
}
if (i==22){
fill_solid(leds[0], NUM_LEDS_PER_STRIP[0], CRGB(30, 16, 0));
fill_solid(leds[2], NUM_LEDS_PER_STRIP[2], CRGB(30, 16, 0));
fill_solid(leds[3], NUM_LEDS_PER_STRIP[3], CRGB(30, 16, 0));
fill_solid(leds2[0], NUM_LEDS_PER_STRIP2[0], CRGB(30, 16, 0));
fill_solid(leds[4], NUM_LEDS_PER_STRIP[4], CRGB(30, 16, 0));
fill_solid(leds[5], NUM_LEDS_PER_STRIP[5], CRGB(30, 16, 0));
fill_solid(leds2[1], NUM_LEDS_PER_STRIP2[1], CRGB(30, 16, 0));
fill_solid(leds[6], NUM_LEDS_PER_STRIP[6], CRGB(30, 16, 0));
fill_solid(leds[7], NUM_LEDS_PER_STRIP[7], CRGB(30, 16, 0));
fill_solid(leds2[2], NUM_LEDS_PER_STRIP2[2], CRGB(30, 16, 0));
fill_solid(leds[8], NUM_LEDS_PER_STRIP[8], CRGB(30, 16, 0));
fill_solid(leds2[3], NUM_LEDS_PER_STRIP2[3], CRGB(30, 16, 0));
fill_solid(leds[9], NUM_LEDS_PER_STRIP[12], CRGB(30, 16, 0));
fill_solid(leds[11], NUM_LEDS_PER_STRIP[11], CRGB(30, 16, 0));
fill_solid(leds[12], NUM_LEDS_PER_STRIP[12], CRGB(30, 16, 0));
fill_solid(leds[17], NUM_LEDS_PER_STRIP[13], CRGB(30, 16, 0));
fill_solid(leds[14], NUM_LEDS_PER_STRIP[14], CRGB(30, 16, 0));
fill_solid(leds[15], NUM_LEDS_PER_STRIP[15], CRGB(30, 16, 0));
fill_solid(leds2[4], NUM_LEDS_PER_STRIP2[4], CRGB(30, 16, 0));
fill_solid(leds2[5], NUM_LEDS_PER_STRIP2[5], CRGB(30, 16, 0));
fill_solid(leds[16], NUM_LEDS_PER_STRIP[16], CRGB(30, 16, 0));
for(int j = 0; j < NUM_LEDS_PER_STRIP[18]; j++) {
leds[18][j] = CRGB(30, 16, 0);
}
//valvesubroutine + leds 0, 2, 3, FLT-1, 4, 5, PSA-1, 6, 7, ACT-1, 8, FLT-2, 9, 11, 12, 13, 14, 16, 15, and 37 illuminate
if (i==22){
fill_solid(leds[0], NUM_LEDS_PER_STRIP[0], CRGB(30, 16, 0));
fill_solid(leds[2], NUM_LEDS_PER_STRIP[2], CRGB(30, 16, 0));
fill_solid(leds[3], NUM_LEDS_PER_STRIP[3], CRGB(30, 16, 0));
fill_solid(leds2[0], NUM_LEDS_PER_STRIP2[0], CRGB(30, 16, 0));
fill_solid(leds[4], NUM_LEDS_PER_STRIP[4], CRGB(30, 16, 0));
fill_solid(leds[5], NUM_LEDS_PER_STRIP[5], CRGB(30, 16, 0));
fill_solid(leds2[1], NUM_LEDS_PER_STRIP2[1], CRGB(30, 16, 0));
fill_solid(leds[6], NUM_LEDS_PER_STRIP[6], CRGB(30, 16, 0));
fill_solid(leds[7], NUM_LEDS_PER_STRIP[7], CRGB(30, 16, 0));
fill_solid(leds2[2], NUM_LEDS_PER_STRIP2[2], CRGB(30, 16, 0));
fill_solid(leds[8], NUM_LEDS_PER_STRIP[8], CRGB(30, 16, 0));
fill_solid(leds2[3], NUM_LEDS_PER_STRIP2[3], CRGB(30, 16, 0));
fill_solid(leds[9], NUM_LEDS_PER_STRIP[12], CRGB(30, 16, 0));
fill_solid(leds[11], NUM_LEDS_PER_STRIP[11], CRGB(30, 16, 0));
fill_solid(leds[12], NUM_LEDS_PER_STRIP[12], CRGB(30, 16, 0));
fill_solid(leds[13], NUM_LEDS_PER_STRIP[13], CRGB(30, 16, 0));
fill_solid(leds[17], NUM_LEDS_PER_STRIP[17], CRGB(30, 16, 0));
fill_solid(leds[14], NUM_LEDS_PER_STRIP[14], CRGB(30, 16, 0));
fill_solid(leds[15], NUM_LEDS_PER_STRIP[15], CRGB(30, 16, 0));
fill_solid(leds2[4], NUM_LEDS_PER_STRIP2[4], CRGB(30, 16, 0));
fill_solid(leds2[5], NUM_LEDS_PER_STRIP2[5], CRGB(30, 16, 0));
fill_solid(leds[16], NUM_LEDS_PER_STRIP[16], CRGB(30, 16, 0));
fill_solid(leds[18], NUM_LEDS_PER_STRIP[18], CRGB(30, 16, 0));
if (buttonPressCount==5){
fill_solid(leds3[6], NUM_leds_PER_STRIPS3[6], CRGB::Green);
}
for(int j = 0; j < NUM_LEDS_PER_STRIP[45]; j++) {
leds[45][j] = CRGB(30, 16, 0);
FastLED.show();
}
newMillis = millis();
if (newMillis - currentMillis > period){
i++;
currentMillis = millis();
}
}
}
// Delay a little bit to avoid bouncing
delay(50);
}
// Save the current state as the last state, for the next loop iteration
laststartState = startState;
}
}
}
}
}