2020-08-11 00:28:11 +00:00
# Pimoroni Fan Shim
The below commands will setup the Pimoroni Fan Shim. The commands will turn the fan on at 45C and off again at 50C. Adjust if you need different values.
``` sh
2020-08-11 01:33:24 +00:00
sudo -sHu root
# Move boot serial -> UART5 to avoid colission between UART1 and fanshim
nano -w /boot/firmware/usercfg.txt
# Add following to top of file
2020-08-11 20:22:54 +00:00
# Enable uart5 on pins for ttyAMA1
# Pin 32 : TX (connect to RX on adapter)
# Pin 33 : RX (connect to TX on adapter)
2020-08-11 01:33:24 +00:00
dtoverlay=uart5
2020-08-11 20:22:54 +00:00
# Turn off uart ; fanshim will break boot if this is enabled
# Further reading: https://bugs.launchpad.net/ubuntu/+source/u-boot/+bug/1873520
enable_uart=0
2020-08-11 01:33:24 +00:00
nano -w /boot/firmware/cmdline.txt
# switch console=serial0,115200 to console=ttyAMA1,115200
systemctl reboot
# New pins
# Pin 32 : TX (connect to RX on adapter)
# Pin 33 : RX (connect to TX on adapter)
# Setup fanshim
2020-08-11 00:28:11 +00:00
sudo -sHu root
git clone https://github.com/pimoroni/fanshim-python.git /opt/fanshim-python
cd /opt/fanshim-python
./install.sh
cd examples
2020-08-11 01:33:24 +00:00
sudo ./install-service.sh --on-threshold 55 --off-threshold 45 --delay 5 --brightness 127
2020-08-11 00:28:11 +00:00
systemctl enable --now pimoroni-fanshim.service
```