Skip to content

kamencesc/pi-fan-controller

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pi Fan Controller

Raspberry Pi fan controller.

Description

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.

Terminal commands

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

About

Raspberry Pi fan controller.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 81.0%
  • Shell 19.0%