Simple Python and shell scripts to run a fan on a Raspberry Pi using CPU temperature.
MIT License
Simple Python and shell scripts to run a fan based on CPU temperature for your Raspberry Pi.
This setup uses GPIO pin 18 with an NPN Transistor (S8050). Wiring diagrams
for this setup are provided in the wiring_diagrams
directory, with an image
of the most basic setup below.
Here's how to run this script automatically on boot:
The code included in this repository is mainly the work of others, with some modification and adaptations made to the code to document the approach.
Thanks to @vollman-ariel for providing a wiring diagram which includes an additional resistor.