Browse Source

* try fixing DHT sensor reading errors by adding some short delay before/after

FloKra 4 years ago
parent
commit
29dc64960e

+ 3 - 0
CHANGELOG.md

@@ -1,4 +1,7 @@
 # WiFiThermostat - Changelog
+## 0.3.3
+* try fixing DHT sensor reading errors by adding some short delay before/after
+
 ## 0.3.2
 * fixed/improved: HTTP authentication handling
 * added: device hostname (announced via DHCP) can now be configured

BIN
bin/WiFiThermostat.ino.d1_mini.20191031_v0.3.3.bin


+ 1 - 1
src/WiFiThermostat/WiFiThermostat.ino

@@ -7,7 +7,7 @@
 #define SPIFFS_USE_MAGIC
 
 #define FIRMWARE_NAME "WiFiThermostat"
-#define VERSION "0.3.2"
+#define VERSION "0.3.3"
 
 // default values, can later be overridden via configuration (conf)
 #define DEVICE_NAME "WiFiThermo-1"

+ 4 - 1
src/WiFiThermostat/thermostat.ino

@@ -1,7 +1,10 @@
 void measureTempHum() {
+  delay(1);
   float tmpHum = round(dht.readHumidity()) + humCorrVal;
+  delay(1);
   float tmpTemp = dht.readTemperature() + tempCorrVal;  // Read temperature as Celsius (the default)
-
+  delay(1);
+  
   int tmpHumInt = tmpHum;
 
   // Check if any reads failed