Title

For simplicity, the code on Brian’s PIIRRI is series of shell commands stored in a .py file. When Cron opens the file, pinPassOn.py, it executes a bash command to turn on the GPio pin that crontab specified. Similarly, pinPassoff.py, turns off the GPio pin. Both executables echo a statment along the lines of Pin x set to on/off which is written to a log file using cron.

pinPassOn.py
#!/bin/bash
gpio write $1 1
echo -n "Pin" $1 "set to ON. "
date
pinPassOn.py
#!/bin/bash
gpio write $1 0
echo -n "Pin" $1 "set to OFF. "
date