-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemp.py
59 lines (52 loc) · 3.71 KB
/
temp.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import time
tPoint = "="
tempGraph = [[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
,[0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95]]
while 1:
print("\x1b[0;0H")
temp = open("/sys/class/thermal/thermal_zone0/temp","r")
tempT = temp.read().split("\n")[0]
for i in range(len(tempGraph) - 2):
tempGraph[i] = tempGraph[i + 1]
tempGraph[-2] = [" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
tempGraph[-2][int(int(tempT) / 5)] = tPoint
for a in range(20):
tempGra = ""
for b in range(32):
tempGra = tempGra + " " + tempGraph[b][19 - a]
print(tempGra + " -- " + str(tempGraph[-1][19 - a]))
print("%s %s" % (tempT,time.time()))
# print(temp.read())
temp.close()
time.sleep(1)