Skip to content
Simple Python and shell scripts to run a fan on a Raspberry Pi using CPU temperature.
Python Shell
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore initial commit Oct 21, 2017
launcher.sh initial commit Oct 21, 2017
readme.md initial commit Oct 21, 2017
run-fan.py Bugfix Jun 30, 2019

readme.md

Raspberry Pi Fan Control

Simple Python and shell scripts to run a fan based on CPU temperature for your Raspberry Pi.

The Setup

This setup uses GPIO pin 18 with an NPN Transistor (S8050).

Wiring Diagram Raspberry Pi Fan Wiring Diagram

Running on Boot

Here's how to run this script automatically on boot:

  • Modify the shell script to ensure you have the correct path run-fan.py.
  • Make the files executable using sudo chmod a+x run-fan.py and sudo chmod a+x launcher.sh.
  • Use crontab (or another method) to execute launcher.sh on boot.

Helpful Links

You can’t perform that action at this time.