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+"\"}"; }