To control an externally attached Raspberry Pi fan
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc
img
.gitignore
COPYING
README.md
control_fan.py
run_fan.sh

README.md

Scripts to control an externally attached fan to the Raspberry Pi 3.

Tutorials referred

How to use

control_fan.py is the script that monitors the temperature and switches the fan on or off as required.

run_fan.sh is a script used to start control_fan.py and put it in the background.

Monitoring

monit can be used to monitor run_fan.sh and restart it in case of failure. Example config:

check program pifan path "/home/pi/scripts/run_fan.sh status"
  start program = "/home/pi/scripts/run_fan.sh start"
  stop program = "/home/pi/scripts/run_fan.sh stop"
  if status == 1 then restart

See also

quirks.md for some implementation decisions.