Flow Alarm

I am playing around with a adafruit flow sensor and need to cram all the code together to make a alarm. I have the alarm side figured out of course. Now I just need something simple that is giving me a hard time. I don’t want to measure flow I just want to see if the sensor is sending data or not. So basically is the water moving or not. I just want it to run like this

If water is moving for for x time like 20min, then sound alarm. else keep reading sensor.
Now the water will stop and start so I just want to see if at one span it runs for 20min and the alarm. So if it is still for even a second I want it to reset and start timing after it starts back up. Ill now show you my code, its bad :o …

Flowsensor_code.ino (3.09 KB)

Test_flow_alarm.ino (851 Bytes)

Use a "missing pulse detector".

This is simply a monostable that is being continuously reset within the time. If the pulse does not arrive, then the monostable triggers and the alarm is detected.

Weedpharma

Thank you I will research your info!!