PINE64
PWM Fan Control Python Script - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: ROCKPRO64 (https://forum.pine64.org/forumdisplay.php?fid=98)
+--- Forum: Linux on RockPro64 (https://forum.pine64.org/forumdisplay.php?fid=101)
+--- Thread: PWM Fan Control Python Script (/showthread.php?tid=15983)



PWM Fan Control Python Script - superbox - 02-04-2022

I am written a python script to control my fan with pwm. The script is inspirated by shell script from the armbian forum.
You can set the pwm period and duty_cycle.

The script monitoring cpu and all disks an activate the fan when required.

https://github.com/mh-superbox/pwm-fan-control

period
The total period of the PWM signal (read/write). Value is in nanoseconds and is the sum of the active and inactive time of the PWM.

duty_cycle

The active time of the PWM signal (read/write). Value is in nanoseconds and must be less than the period.

More info about pwm: https://www.kernel.org/doc/Documentation/pwm.txt