I do have trouble reading DHT22.
I did write code to read DHt22, BMP180 and ds18B20 sensors with a NodeMCU ESP12.
The basic is running fine.
I facing a problem that reading the DHT is not stable.
I read the sensors every 2 seconds.
At this moment the reading of the DHT22 is causing trouble by not reading every time.
Lets say that in avarage (But it is random) that about every 10 readings there is a misreading.
The strange thing is that before the code did run for 100% without misreading, but after adding some code to the sketch (nothing to do with the DHT part of the code) this misreading suddenly appears
It looks like that changing the code the time need to run the code causes misreadings.
I did try to change the code by adding extra delays etc.
Nothing is helping
I know you can change the 3th factor in the command: DHT dht(DHTPIN, DHTTYPE,5); does influence the reading. I changed this factor several times with indeed some changes in misreading but never get rid of it.
Is somebody recognise this?
And more important is there e method to avoid this?