is it possible to have an IF statement like (if a signal is HIGH for a particular period of time , a set of commands are executed ) .
If it can be done please explain me the concept and the statements.
is it possible to have an IF statement like (if a signal is HIGH for a particular period of time , a set of commands are executed ) .
If it can be done please explain me the concept and the statements.
Note that start time of the event. In every iteration of loop check to see if the event has lasted long enough. If it meets that threshold perform your action.
Look at blink without delay.
Yes
Save the value of millis() when the signal goes HIGH. Each time through loop() check whether the signal is still HIGH. If so then subtract the start time from the current value of millis() and execute your code if the required number of milliseconds has passed.