Hello guys, I need help with a code.
I am automating an alarm center and I would like to program the arduino to send me a message every time:
1- The alarm is activated (on)
2 - The alarm has been deactivated (off)
3 - The alarm goes off
When the alarm is activated (on), it triggers a pulse. When it is deactivated, it triggers two pulses. And when it goes off, the pulse is continuous.
I need help to write a code that read the rising edge, and if it detects a pulse within 3 seconds, it would do an X command, if it detects two pulses, Y command, and if the pulse is active for more than 3 seconds, it would execute Y command.
Can you help me?
Thank you!