What I'm trying to do is when the sketch goes to CASE1 I want to basically start a timer and for every second passed the variable 'counter' will have 1 added to it.
To finish it off I want to compare 'counter' variable to another number then proceed after that.
case CASE1:
if(currentMillis - previousMillis > 1000) {
previousMillis = currentMillis;
counter = counter + 1;
}
if (counter = 30){
state = CASE2
}
break;