Sorry for the noob question but I can't exit the while loop. I have a variable called control
which take the timestamp value from the internet. I need to execute some functions when control is between 2 values and then when control is between other 2 values I need to change while loop. Anyway even when control is between soglia2 and soglia3 the first while loop keeps going.
What am I missing? Thanks a lot
while (control >= soglia1 && control <soglia2){
Serial.println("Entering second slot");
Serial.println("Enter modem sleep mode");
sleep_mode();
delay(10000);
}
while (control >= soglia2 && control < soglia3){
//do something
Serial.println("Entering third slot");
Serial.println("Exit modem sleep");
active_mode();
delay(10000);
}