pimoroni / fanshim-python

Python library for the Fan SHIM for Raspberry Pi
https://shop.pimoroni.com/products/fan-shim
MIT License
295 stars 86 forks source link

Investigate dropping psutil in favour of reading device nodes #73

Closed Gadgetoid closed 1 year ago

Gadgetoid commented 4 years ago

It looks like in many (all?) cases we can just attempt to read /sys/class/thermal/thermal_zone0/temp and /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq to get the current CPU temperature and CPU scaling frequency- avoiding the psutil dependency.

Building some functions into Fan SHIM to report these figures would seem sensible.

This is a continuation of - https://github.com/pimoroni/fanshim-python/issues/58 - in an effort to get compatibility beyond just Raspbian.

Gadgetoid commented 4 years ago

This should also fix: https://github.com/pimoroni/fanshim-python/issues/13