[SOLVED] Issues creating a auto/manual pump control

This project works quite similiar to mine. So i follow what he wrote and auto-mode work like a charm. i delete the timer so it wont overflow to the next timer which caused an infinite cycle. YAY! Phew, after so many hours.

void Auto(){
  
  if( i==0 && selectmode ==0){
  digitalWrite(relay1, HIGH);
  //timer.disable(timer2);
  timer2=timer.setTimeout(5000L,OFF);}
  
}

void OFF(){
  timer.deleteTimer(timer2);
  digitalWrite(relay1, LOW);

}
3 Likes