DHT Library reports 'nan'

With multiple esp8266 and multiple dht22, the dht22 library produces ‘nan’ for the reading of temperature/humidity data with a normal wiring of the DHT22.

I’ve wired the + to 3.3V, the - to ground, and the signal line to the D2 pin. Interestingly when I use a different pin number in the software (not the actual wiring) the DHT library reports a different output. Regardless, when the correct input is used, it says ‘nan’ for its result.

I’ve reproduced this with a full combination of (2) dht22 sensors and (2) esp2866 nodemcu 2.0 boards. So I think that eliminates hardware issues.

I posted my code here which is generic from the examples with the dht22: gist:4d2a09289e8b7091fdf06567912ddb2e · GitHub

I am using the platform installed “DHT-sensor-library” and “Adafruit_Sensor” which install and build just fine.

This seems vaguely related to Problem with DHT.h - #2 by dniklaus

This was a wiring issue on my part. After getting the wiring correct things started working. I used the ‘blink’ test program and a multimeter to confirm the software -> hardware pinout. This issue is resolved.