DeviceTree overlay for a Raspberry Pi HAT with a PWM fan, based on https://github.com/lzoledziewski/rpi-pwm-fan
The fan's PWM wire should be connected to GPIO18 (PWM0). This can be changed to a different PWM pin with the pwms
property in rpi-pwm-fan-overlay.dts.
sudo apt install make gcc device-tree-compiler
git submodule update --init --recursive
cd hats/eepromutils
make && sudo make install
make
sudo make flash
Add to /boot/config.txt
:
[all]
dtoverlay=pwm
dtoverlay=rpi-pwm-fan
If not using a HAT EEPROM, you can install the files to your system:
sudo make install
This can be reversed with:
sudo make uninstall