Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Angelo Santagata
#24381
andywhit wrote:
Angelo Santagata wrote:OK. Im now stumped again...

For some reason I no longer get any readings.. and constantly get Failed to read from DHT Sensor in my code, not always but 80% of the time....

Code is trivial.. and Im now baffled again..
Ive set the 3rd param to 15.. baffling]


What board type are you using in the IDE when uploading the sketch ?

I had intermittent problems reading DHT11 on my 8266 201 running on a Dev board when I used the "Generic 8266" board setting. Changing to one of the esp-12 board settings when uploading the sketch resolved the issue.


I'm using a nodeMCU 2.0 board, to use it I needed to set ESP8266-12E, but I also have a ESP8266-7 I could try it on....
User avatar
By tytower
#24444 The ArduinoIDE gives you the nodeMCUboard with ESP8266 . do you mean that is the one you use or some other?
Check your libraries . There should only be one called DHT . Check in it that the DHT statement you are using in your program matches the function in your library. Then stop changing things and work out what else may be affecting the sensor. I find they often return nan and no temperature and I put my problem down to capacitance on the wiring connecting the sensor to the board.

If its possible solder the sensor in and make sure your power supply at 3.3V can supply the required 250mA bursts.
User avatar
By Angelo Santagata
#24461 I have a nodeMCU V1 board, it needed me to use NodeMCU 1.0 (ESP-12E Module) Option

The NodeMCU board is powered by the 5V from PC USB and has its own regulator .

What I'll try and do is remove all other components from the breadboard and make sure its not a power issue.
I also have ESP8266-7, which has a seperate PSU (2A) so this can check that its not a psu issue.

thanks