I am wondering about the accuracy of the DHT11 sensor. I have two of these, one supplied in a Joyit SensorKit X40 and one in a AZ-Deliver 16 in 1 Sensors Kit.. Both deliver different vaues with the same sketch running on a ESP32, the Joyit version giving 22.00°C and 19% humidity and the AZ-Delivery version giving 22.70°C and 32% humidity. The AZ-Delivery version is very similar to other sensors I have used.
Another issue is that according to the datasheet the DHT11 sensor has an operating range of 3V to 5.5V, The above figures are with 3.3V. However if I use 5V the Joyit version gives 24°C and 30% and the AZ-Delivery version 22,6°C anf 32%.
So it seems as though the JoyIt version is out of specification, both with the operating voltage and readings.
These aren't particular precise. I don't know what you are going to use them for, but for most application this is accurate enough. If you want a precise one, you can use this Temperatuur/Vochtigheid Sensor Module Breakout - HTU21D - OTRONIC. But that has also an accuracy of +-2%
I once put 5 of those things (DHT11) shoulder to shoulder on a breadboard and let them stabilize for an hour. Ambient temp was about 22C, DHTs read from 19 to 25, humidity (42% ambient ) from 27 to 60+. Not worth the 50 cent cost.
If you have an accurate reference thermometer, you can add or subtract an offset to get them in the ballpark, post your code.
Interesting! What was the actual humidity level? What reference are you using to verify the readings? Additionally, what type of chamber or environment are you using to measure and determine the values? Keep in mind that even something as simple as breathing on the sensors could alter their output significantly.
Both sensors are, and have been for days, sitting on my desk. I simply replace one with the other without changing anything else. The reading I am using for comparison is made with a M5Paper sketch which I have had running in the same room for years, this gives 19.6°C and 32%