You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both values are the respective accuracy values, not their resolution.
The resolution 'field' in the Adafruit Unified sensor layer is defined in Adafruit_Sensor.h float resolution; /**< smallest difference between two values reported by this sensor */
i.e. is clearly a resolution and not 'accuracy'
The correct values should be:
Lines 213-217
case DHT11:
sensor->max_value = 80.0F;
sensor->min_value = 20.0F;
sensor->resolution = 1.0F; // corrected from 5
break;
and lines 138-144
case DHT11:
sensor->max_value = 50.0F;
sensor->min_value = 0.0F;
sensor->resolution = 0.1F; // corrected from 2
break;;
The erroneous data is visible in the output of the Adafruit DHT library sample program: DHT_Unified_Sensor.ino
Temperature Sensor
Sensor Type: DHT11
Driver Ver: 1
Unique ID: -1
Max Value: 50.00°C
Min Value: 0.00°C
Resolution: 2.00°C
The resolution for this sensor is 0.1°C according to both the spec sheet and observation. Here one can see sequential values differing by 0.1°:
See https://forums.adafruit.com/viewtopic.php?p=957161 for discussion thread.
The Resolution values for both Temperature and Humidity are incorrectly defined in DHT-U.cpp for DHT11 sensors.
Lines 213-217
and lines 138-144
Both values are the respective accuracy values, not their resolution.
The resolution 'field' in the Adafruit Unified sensor layer is defined in Adafruit_Sensor.h
float resolution; /**< smallest difference between two values reported by this sensor */
i.e. is clearly a resolution and not 'accuracy'
The correct values should be:
Lines 213-217
and lines 138-144
The erroneous data is visible in the output of the Adafruit DHT library sample program: DHT_Unified_Sensor.ino
The resolution for this sensor is 0.1°C according to both the spec sheet and observation. Here one can see sequential values differing by 0.1°:
The same goes for the humidity values.
The correct values are found in numerous online data sheets for the DHT11
The fix involves changing values on two lines:
143: sensor->resolution = 0.1F; // corrected from 2
216: sensor->resolution = 1.0F; // corrected from 5
The text was updated successfully, but these errors were encountered: