make 5 deg delta_t to reject more spurious readings
[Arduino] / rpi_promini / rpi_promini.ino
index cfaa948..a2ee8d1 100644 (file)
@@ -115,7 +115,7 @@ void loop() {
   if ( millis() - time > 2000 ) {
     float t = dht.getTemperature();
     float delta_t = abs(t - temp_avg.getAverage());
-    if ( dht.getStatus() == 0 && delta_t < 10 )
+    if ( dht.getStatus() == 0 && delta_t < 5 )
       temp_avg.addValue( t );
     else dht22_errors++;
     float h = dht.getHumidity();