I am trying to build a water top off system for my fish tank (i.e when water low activate the pump). So I got a simple "if" "else" statements to turn on the pump when water is low. I got the a digital input to monitor the water.
Lets say I run out the water inside the reservoir, I wouldn't want the pump to turn on for a long period of time. Is there a way I can monitor the Input state, say if input "HIGH" for 20 seconds, shut off the pump?
Any feedbacks would be appreciated :-)