Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 650 Bytes

File metadata and controls

26 lines (21 loc) · 650 Bytes

rpiFanAutoControl(树莓派风扇自动调速)

增加了静音模式,夜间时风扇更加安静

实测静音模式下 cpu稳定在 48 - 50 度 也还可以

20:00 - 2:00 为静音模式

可根据需求自行修改

n = time.asctime(time.localtime(time.time()))  # 当前时间
nowHour = int(time.strftime("%H", time.localtime()))  # 当前小时
if nowHour >= 20 or nowHour <= 2:
    mode = "mute"
else:
    mode = "normal"
温度℃ 正常(频率) 静音(频率)
50° 100 30
48° 90 30
45° 70 30
40° 40 30

pwm频率范围为 0.0-100.0 风扇转速依次增大