void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
}
void loop() {
delay(10);
int INTERVALO = 5000;
static byte COUNTER;
static long delayIncremento;
if(millis() - delayIncremento > INTERVALO){
delayIncremento = millis();
COUNTER++;
Serial.print(" COUNTER ");
Serial.println(COUNTER);
}
switch(COUNTER){
case 0:
Serial.print("loop 1");
Serial.println();
INTERVALO = 2000;
break;
case 1:
Serial.print("loop 2");
Serial.println();
break;
case 2:
Serial.print("loop 3");
Serial.println();
break;
default:
COUNTER = 0;
break;
}
}