fix
This commit is contained in:
parent
2e6f6b3f1a
commit
36dfe0b9c9
@ -56,11 +56,11 @@ while True:
|
|||||||
t_split[1] = t_split[1][:-t_cut]
|
t_split[1] = t_split[1][:-t_cut]
|
||||||
temperature = t_split[0] + "." + t_split[1]
|
temperature = t_split[0] + "." + t_split[1]
|
||||||
|
|
||||||
print("temperature after cut: " + temperature)
|
print("temperature after cut: " + str(temperature))
|
||||||
# Get Humidity from DHT
|
# Get Humidity from DHT
|
||||||
humidity, _ = Adafruit_DHT.read_retry(DHT_SENSOR, DHT_PIN)
|
humidity, _ = Adafruit_DHT.read_retry(DHT_SENSOR, DHT_PIN)
|
||||||
|
|
||||||
print("humidity before cut: " + humidity)
|
print("humidity before cut: " + str(humidity))
|
||||||
# cut humidity to xx.xx if more then tow digits after "."
|
# cut humidity to xx.xx if more then tow digits after "."
|
||||||
h_split = humidity.split(".")
|
h_split = humidity.split(".")
|
||||||
if len(h_split[1]) > 2:
|
if len(h_split[1]) > 2:
|
||||||
|
Loading…
Reference in New Issue
Block a user