I am a newbie and a hobbyist in Arduino. I am facing a issue with delay function for a program of IR remote. Below are the steps how the program must behave:
1 button pressed-LED on 3 Button pressed -LED off. 2 Button pressed LED must be ON for 30 seconds and if 3 button is pressed, the LED must get out of delay loop and must follow the instruction .
Problem Statement- if i press 2 it stays in delay of 30 seconds till then no further instruction could be excecuted. I heard of Millis function we can use for such delays.Could any one suggest ,how to modify the below code fulfilling the condition in which we can interrupt the delay