Arduino IDE serial monitor show’s fail to read from dht sensor.
DHT11 sensor is connected to Digital Pin 2. There is a 10k resister between data and vcc of this sensor.
There is a per second blink in node mcu onboard led, Tried adding D4 button for node mcu led blinking, its working. I can see the response.
This sensor is working with arduino uno using analog pin. But don’t know why this isn’t working with node mcu. Most of the people are using 3 pin dht11 sensor. Is that a problem?
My guess is you are wired up to the wrong pins. On ESP’s that have screen printing on the PCB, D2 doesn’t mean digital pin 2 like it does on an Arduino.
The D references on ESP’s are totally different to the pinout on an Arduino. Look up the pinout for your device,
Although you may be better off changing your code to pin 4 and leaving your wire connected to D2. I believe GPIO2 is a special one that needs to be at a certain state at boot or else it will boot in a different mode.
@Toro_Blanco Thank you so much I changed code to pin 4 and now it’s working So happy doing this, really appreciate your help and detailed information about pins. D2 is GPIO4!
@Costas you were right my wiring was not correct. The default dht11 Blynk sample code was expecting to connect data pin of sensor to D4(gpio2). Thank You!