Problem with nodemcu +DHT11+Blynk

when i use adafruit example code i have no errors but when i use blynk example code i receive nothing when i connect dht pin and when i remove it i receive Failed to read from DHT sensor!
Sorry for bad english

Share your code, then we could understand your problem better

< removed unformatted code - moderator >

Please repost your code properly… Thank you.

What’s about your project at blynk app?

Are you sure that you configured the widgets’ pins properly?

I also had problems with the DHT11 + blynk, strangely when I sent the temperature first and then the humidity… it didn’t work but if it did the opposite … yes.

Try to use a small delay (10 or 20ms) after read the dht values… sometimes this works

i changed code to this i dont need humidity but still no answer from dht 11

< removed unformatted code - moderator >

what he said

I’ll repeat…

Is your ESP running the latest firmware…2.4.1?

@trystan4861 he shared his Auth Code on the Blynk cloud server:

so you can see the widget setup here:

There’s two gauge widgets, with no mapping, connected to V5 and V6 plus a slider connected to GPIO16.

@cloni the pin that the DHT sensor is connected to is different in your two sketches - Pin 2 in the first sketch and Pin 4 in the second sketch. Are you aware that these are GPIO numbers, not the “D” numbers that are screen printed onto the NodeMCU board?

GPIO 2 = NodeMCU D4
GPIO 4 = NodeMCU D2


1 Like

@cloni Please go back and edit your posts with properly formatted code… read the above provided links to see how that is done.