mirror of
https://github.com/alexellis/seeds2.git
synced 2022-05-09 04:08:56 +03:00
7 lines
188 B
Python
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)
|