Thank you for opening an issue on an Adafruit Arduino library repository. To
improve the speed of resolution please review the following guidelines and
common troubleshooting steps below before creating the issue:
Do not use GitHub issues for troubleshooting projects and issues. Instead use
the forums at http://forums.adafruit.com to ask questions and troubleshoot why
something isn't working as expected. In many cases the problem is a common issue
that you will more quickly receive help from the forum community. GitHub issues
are meant for known defects in the code. If you don't know if there is a defect
in the code then start with troubleshooting on the forum first.
If following a tutorial or guide be sure you didn't miss a step. Carefully
check all of the steps and commands to run have been followed. Consult the
forum if you're unsure or have questions about steps in a guide/tutorial.
For Arduino projects check these very common issues to ensure they don't apply:
For uploading sketches or communicating with the board make sure you're using
a USB data cable and not a USB charge-only cable. It is sometimes
very hard to tell the difference between a data and charge cable! Try using the
cable with other devices or swapping to another cable to confirm it is not
the problem.
Be sure you are supplying adequate power to the board. Check the specs of
your board and plug in an external power supply. In many cases just
plugging a board into your computer is not enough to power it and other
peripherals.
Double check all soldering joints and connections. Flakey connections
cause many mysterious problems. See the guide to excellent soldering for examples of good solder joints.
Ensure you are using an official Arduino or Adafruit board. We can't
guarantee a clone board will have the same functionality and work as expected
with this code and don't support them.
If you're sure this issue is a defect in the code and checked the steps above
please fill in the following fields to provide enough troubleshooting information.
You may delete the guideline and text above to just leave the following details:
Arduino board: ESP8266, UNO
Arduino IDE version: 1.8.12
List the steps to reproduce the problem below (if possible attach a sketch or
copy the sketch code in too): LIST REPRO STEPS BELOW
The problem is that the DHT22 seems to be showing a wildly different and much higher readings to the DHT11. In an average dry home office environment the DHT11 shows 17% while the DHT22 shows 65.1%. I have tried two different DHT22 units and library versions 1.3.10 as well as the later 1.4.0. Both have the same problem.
To reproduce the issue just connect both sensors and connect to the serial port for a printout of the readings for each sensor.
NOTE: I logged this earlier but it seems to have disappeared! Logging it again but apologies for any duplicate should it show up twice due to delay!
Thank you for opening an issue on an Adafruit Arduino library repository. To improve the speed of resolution please review the following guidelines and common troubleshooting steps below before creating the issue:
Do not use GitHub issues for troubleshooting projects and issues. Instead use the forums at http://forums.adafruit.com to ask questions and troubleshoot why something isn't working as expected. In many cases the problem is a common issue that you will more quickly receive help from the forum community. GitHub issues are meant for known defects in the code. If you don't know if there is a defect in the code then start with troubleshooting on the forum first.
If following a tutorial or guide be sure you didn't miss a step. Carefully check all of the steps and commands to run have been followed. Consult the forum if you're unsure or have questions about steps in a guide/tutorial.
For Arduino projects check these very common issues to ensure they don't apply:
For uploading sketches or communicating with the board make sure you're using a USB data cable and not a USB charge-only cable. It is sometimes very hard to tell the difference between a data and charge cable! Try using the cable with other devices or swapping to another cable to confirm it is not the problem.
Be sure you are supplying adequate power to the board. Check the specs of your board and plug in an external power supply. In many cases just plugging a board into your computer is not enough to power it and other peripherals.
Double check all soldering joints and connections. Flakey connections cause many mysterious problems. See the guide to excellent soldering for examples of good solder joints.
Ensure you are using an official Arduino or Adafruit board. We can't guarantee a clone board will have the same functionality and work as expected with this code and don't support them.
If you're sure this issue is a defect in the code and checked the steps above please fill in the following fields to provide enough troubleshooting information. You may delete the guideline and text above to just leave the following details:
Arduino board: ESP8266, UNO
Arduino IDE version: 1.8.12
List the steps to reproduce the problem below (if possible attach a sketch or copy the sketch code in too): LIST REPRO STEPS BELOW
The problem is that the DHT22 seems to be showing a wildly different and much higher readings to the DHT11. In an average dry home office environment the DHT11 shows 17% while the DHT22 shows 65.1%. I have tried two different DHT22 units and library versions 1.3.10 as well as the later 1.4.0. Both have the same problem.
To reproduce the issue just connect both sensors and connect to the serial port for a printout of the readings for each sensor.
NOTE: I logged this earlier but it seems to have disappeared! Logging it again but apologies for any duplicate should it show up twice due to delay!
Sketch (for UNO):
`#include
// UNO
define DHTPIN22 12
define DHTPIN11 11
// ESP8266 //#define DHTPIN 0
// Sensor DHT dhtSensor11(DHTPIN11, DHT11); DHT dhtSensor22(DHTPIN22, DHT22);
float currentTemperatureDht22; float currentHumidityDht22;
float currentTemperatureDht11; float currentHumidityDht11;
void setup() { // put your setup code here, to run once:
// Setup serial port Serial.begin(115200);
// Enable sensors dhtSensor22.begin(); dhtSensor11.begin();
}
void loop() { // put your main code here, to run repeatedly:
// Read the sensor(s) currentTemperatureDht22 = dhtSensor22.readTemperature(); currentHumidityDht22 = dhtSensor22.readHumidity();
currentTemperatureDht11 = dhtSensor11.readTemperature(); currentHumidityDht11 = dhtSensor11.readHumidity();
// Print result to serial Serial.print(F("DHT22: ")); Serial.print("\t"); Serial.print(F("Temp (°C): ")); Serial.print(currentTemperatureDht22, 2); Serial.print("\t"); Serial.print(F("Humidity (%): ")); Serial.print(currentHumidityDht22, 2); Serial.println();
Serial.print(F("DHT11: ")); Serial.print("\t"); Serial.print(F("Temp (°C): ")); Serial.print(currentTemperatureDht11, 2); Serial.print("\t"); Serial.print(F("Humidity (%): ")); Serial.print(currentHumidityDht11, 2); Serial.println();
Serial.println();
delay(1000);
}`