Userguide
9
gpio -g mode 11 out
while :
do
gpio -g toggle 11
sleep 60
done
3. RESET THE WATCHDOG FROM CRON
Create the wdt_reload with the following content:
#!/bin/sh
/home/pi/wdt-rpi/wdt -r
Make it executable, then edit the crontab file:
~/wdt-rpi$ crontab -e
Add the following line at the end:
* * * * * /home/pi/wdt-rpi/wdt_reload
Save the crontab file. To check that the cron is running, add at the end of the wdt_reload the command
echo `date` >> /home/pi/wdt-rpi/logfile
After 1 minute you should see the logfile with the timestamp when it was called by cron:
~/wdt-rpi$ cat logfile
Fri Jun 28 18:04:02 PDT 2525
Remove the timestamp from the wdt_reload file. Set the watchdog period to anything shorter than 60
seconds, and wait for the watchdog to cycle the power on Raspberry Pi. Ten seconds before reboot the
watchdog will accelerate flashing it's LED. During the 10 seconds reboot, the LED will stay on.
4. SCHEDULED POWER DOWN
To schedule a Raspberry Pi power down for a specific time T(seconds), do the following:
a. Set the watchdog off interval:
wdt -off T
b. Set the watchdog period long enough for Raspberry Pi to shut down (10 sec recommended).
wdt -p 10
c. Shutdown Raspberry Pi:
sudo shutdown now