Raspberry Pi fan controller.
This repository provides scripts that can be run on the Raspberry Pi that will monitor the core temperature and start the fan when the temperature reaches a certain threshold.
To use this code, you'll have to install a fan. The full instructions can be found on our guide: Control Your Raspberry Pi Fan (and Temperature) with Python.
This scripts runs on a screen session (so, you need to install screen "sudo apt install screen"), this creates a sesion called "fancontroller".
To enter you need to use this to redeem the session:
screen -r fancontrol
And to detach the session only press ctrl+a ctrol+d
The commands availabe are:
- auto: Change to standard mode.
- on: Allways on
- off: Allways off (no fan)
- min=value: Change the value for the OFF_THRESHOLD
- max=value: Change the value for the ON_THRESHOLD
- sleep=value: Change sleep value, interval between temperature reading
Note that the values only change for the active session, when you restart your PI all the configs back to the default values of the script. The change will be applied each time that the script reads temperature.
You can controll the fan via easy scripts with a line like this:
screen -S fancontrol -p 0 -X stuff "COMMAND^M"
Change COMMAND for any of the commands mentioned before