I am running a code and after nothing has happened for so long the display shut off to conserve power (maybe the arduino sleep too but another topic). The time I am trying to get is to at least 10 minutes and preferably 15. I cant use the delay i am used to because I have to "watch" the buttons instead of stopping the code for x seconds.
Right now the main code is checking for button pushes. A simple version is:
void loop(){
Check Left Button;
// do this
Check Right Button;
// do this
}
and change to something like:
void loop(){
if timer<999,9999{
Check Left Button;
// do this
timer=0;
Check Right Button;
// do this
else{
Sleep;
timer=0;
}
}
I tried the second example and it slowed it down setting the timer threshold up to 9,999. After that nothing. I think it has to do with me storing timer as an integer, but am new and not sure. Is there a better way, do I need use something besides an integer?