Hardware:
- RPI
- 5V Fan
- Transistor (for example IRF3205)
- Resistor 100 OM
- Resistor 10k OM
Software:
- Python3
Clone repository
git clone https://github.com/aldiserg/RPI_shim_fan.git
cd RPI_shim_fan
Change path to shim.py into shimFAN.service
ExecStart=python /path/to/shim.py
Change connected pin into shim.py (line 9)
dataPIN = 17 # change data pin if needed
Create the service
sudo cp shimFAN.service /etc/systemd/system/shimFAN.service
sudo systemctl enable shimFAN --now