Skip to content

Python script to control 4pin fan according to CPU temperature

License

Notifications You must be signed in to change notification settings

leow149/pi_fan_control

Repository files navigation

codefactor Updates Python 3 License: MIT

pi_fan_control

With this python script the speed of a 4-pin PWM fan is rising with the temperature of your raspi-CPU.

!!!YOU HAVE TO CONNECT THE GROUND OF THE FAN TO A GROUND PIN OF YOUR PI TO GET THIS TO WORK!!!

Initialisation:

  • Connect the PWM pin of your fan to GPIO 12

  • Connect the ground pin of your fan to a ground pin of your Pi

  • python3 -m pip -r requirements.txt

  • python3 pi_fan_control.py

  • Optional: Change mintemp and maxtemp in the python script to your needs. Below mintemp it will set the speed to slowest and above maxtemp it will set it to fastest.

About

Python script to control 4pin fan according to CPU temperature

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages