I wrote most of the gate sensor software at the Spokane hackerspace last night and wrapped it up when I got home.
The rules are pretty simple:
- If the gate is left open too long start beeping
- A push button can be pressed to restart the alarm count down
- Repeatedly pressing the push button doubles the time for the alarm count down
- If the alarm sounds long enough, a signal is sent several times to the gate controller to try and close the gate.
- If the sensor cannot force the gate to close, a signal is sent to a wireless sensor for my burglar alarm so the monitoring company can be alerted my gate is stuck open and they can call me.
This is working correctly using LEDs to detect signals and a simple switch to emulate the gate sensors. Next up is expanding the circuitry to actually be able to interface to the real world equipment.