om-watchdog 251 B

123456789101112131415
  1. #!/bin/sh
  2. GPIO=$1
  3. trap "" INT HUP
  4. echo $GPIO > /sys/class/gpio/export
  5. echo out > /sys/class/gpio/gpio${GPIO}/direction
  6. while true; do
  7. echo 1 > /sys/class/gpio/gpio${GPIO}/value
  8. sleep 1
  9. echo 0 > /sys/class/gpio/gpio${GPIO}/value
  10. sleep 180
  11. done