We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d96c058 commit c11e215Copy full SHA for c11e215
web_interface/get_data.py
@@ -60,17 +60,21 @@ def readSensor(self):
60
return (temp, humi)
61
62
63
-am232x = AM232x(1)
64
-(t, h) = am232x.readSensor()
65
-print("Temperature: %.2f C" % (t))
66
-print("Humidity: %.2f" % (h))
+def get_data():
+ am232x = AM232x(1)
+ (t, h) = am232x.readSensor()
+ print("Temperature: %.2f C" % (t))
67
+ print("Humidity: %.2f" % (h))
68
+ return (t, h)
69
70
71
def get_temperature():
72
+ (t, h) = get_data()
73
return float(t)
74
75
76
def get_humidity():
77
78
return float(h)
79
80
0 commit comments