This commit is contained in:
robert 2021-02-15 23:26:13 +01:00
parent 2e6f6b3f1a
commit 36dfe0b9c9

View File

@ -56,11 +56,11 @@ while True:
t_split[1] = t_split[1][:-t_cut]
temperature = t_split[0] + "." + t_split[1]
print("temperature after cut: " + temperature)
print("temperature after cut: " + str(temperature))
# Get Humidity from DHT
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 "."
h_split = humidity.split(".")
if len(h_split[1]) > 2: