Sorry I'm bad at wording questions.
For example, if all my buttons are low, the IF can run because its requirements are met.
what then happens if I press a button and set it high? Does the IF stop and the milli timer stop. Or does it continue to run as the IF requirements are already met?
int UpButton = digitalRead(22);
int DownButton = digitalRead(23);
int LeftButton = digitalRead(24);
int RightButton = digitalRead(25);
const long timeout = 60000; //1 minute timer
int long time_now = 0;
if(DownButton == LOW){
if(UpButton == LOW){
if(RightButton == LOW){
if(LeftButton == LOW){
if(millis() > time_now + timeout){
time_now = millis();
//Serial.println("Hello"); //Check if any activity, if none, start a 1 minute timer to turn off backlight.
lcd.noBacklight();
}
}
}
}
}