1
0
mirror of https://github.com/alexellis/seeds2.git synced 2022-05-09 04:08:56 +03:00
Files
seeds2-plant-monitoring/cputemp.py
Alex Ellis dff4ec3be5 Initial
2017-06-15 07:39:33 +01:00

7 lines
188 B
Python

class CpuTemp:
def read(self):
f = open("/sys/class/thermal/thermal_zone0/temp", "r")
val = float(f.read())
val = val / 1000.0
return "{0:.2f}".format(val)