This commit is contained in:
robert 2021-02-15 23:26:13 +01:00
parent 2e6f6b3f1a
commit 36dfe0b9c9
1 changed files with 2 additions and 2 deletions

View File

@ -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: