Programming an automated fire extinguisher.

bubulindo:
use millis and read the inputs every half a second or so. that should be enough. :slight_smile:

Cool. How do you put that in the coding?
Thanks for the help!

PeterH:

Exsoldier:
I have a problem, i found out the Smoke detectors bounce on the I/O pins. This is bad, which means the waterpumps/relays would turn off and on all the time (1000ms bounce). How can i debounce that factor? So when the detectors are HIGH they stay HIGH and do not stop all of a sudden. :frowning:
Help would REALLY be appreciated!

I cannot (most likely) use the Delay fuction. Am I right? Any other easy functions that can fix the job? Or do I need an advanced algorithm? lol
Maybe I could use a pullup resistor and capacitor combo? I have no idea, im lost here.

That's easily handled in software, but you need to know how the signal behaves to deal with it. Is it accurate to say that the output stays low when the alarm is 'off', and pulses high and low at about 1Hz when the alarm is 'on'?

You sir, are correct on both parts. Its the buzzer that makes the electricity do a big sine wave. I havent tried it 100% with the arduino yet tho. So im not 100% sure its gonna be a big problem.