From f7f582973b9b2b628f137f3daa264d78b79bd9d5 Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Thu, 14 May 2020 15:12:46 +0200 Subject: [PATCH] Adapted DHT delay values --- main/main.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/main.ino b/main/main.ino index 8d9e7fa..b98e7e8 100644 --- a/main/main.ino +++ b/main/main.ino @@ -177,9 +177,9 @@ void controller(void){ String getJsonDht(void){ Serial.println("Reading DHT..."); DHT dht(PIN_DHT, DHT11); - delay(600); // Somehow this delay is needed to don't get "nan" values + delay(800); // Somehow this delay is needed to don't get "nan" values String temperature = String(dht.readTemperature()); - delay(600); // Somehow this delay is needed to don't get "nan" values + delay(800); // Somehow this delay is needed to don't get "nan" values String humidity = String(dht.readHumidity()); return "{\"temperature_celcius\":\""+ temperature +"\",\"relative_humidity\":\""+humidity+"\"}"; }