Skip to content

Instantly share code, notes, and snippets.

View leslieadams57's full-sized avatar

Les Adams leslieadams57

  • London
View GitHub Profile
@James-Ansley
James-Ansley / pi5_fan_controller.py
Last active July 9, 2024 21:05
Raspberry Pi 5 Auto Fan Controller
from enum import Enum
import time
TEMP_PATH = "/sys/devices/virtual/thermal/thermal_zone0/temp"
FAN_PATH = "/sys/class/thermal/cooling_device0/cur_state"
class FanSpeed(Enum):
OFF = 0
LOW = 1