Simple program to control fan speed on a single board computer according to current system temperature. It’s written in Go and aimed for the ROCKPro64 SBC as part of the BitBoxBase project.
The program reads the current system temperature from a single file, calculates the appropriate fan PWM value and writes it into a control file. The default values are set for the ROCKPro64 board running Armbian.
- Temperature is read from the file
/sys/class/hwmon/hwmon0/pwm1, in °C * 1000 (e.g.
- Fan is controlled by writing a value between
255(max) into the file