[arm-allstar] Power fail script
Doug Crompton
wa3dsp at gmail.com
Sat Oct 20 22:55:23 EDT 2018
Attached is a power fail check script using the Pi GPIO. By default it
assumes bit 24, pin 35 of the Pi. This bit is pulled low to indicate a
power failure. This could be achieved by a SPDT relay or a clean 3V (no
more!) source powered from the mains. Of course to use this the Pi must be
powered from a source independent of the mains.
The script has a timer set to 30 seconds before it assumes a power fail. It
sends a "power fail set" message at start and after a power failure is
over. When a power failure is happening it says "power failure" on the air
locally every 5 minutes.
Times and GPIO bits are changeable in the script.
The script, after checking, is run in the background and uses an interrupt
requiring scant resources.
Copy this script to your server and make it executable - chmod 750
power_fail_check.sh
*73 Doug*
*WA3DSP*
*http://www.crompton.com/hamradio <http://www.crompton.com/hamradio>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hamvoip.org/pipermail/arm-allstar/attachments/20181020/089e7aa8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: power_fail_check.sh
Type: application/x-shellscript
Size: 3100 bytes
Desc: not available
URL: <http://lists.hamvoip.org/pipermail/arm-allstar/attachments/20181020/089e7aa8/attachment.bin>
More information about the ARM-allstar
mailing list