# DHT22 doesn't transmit to NodeMCU V0.9

I am developing for the NodeMCU V0.9 with the NonOS SDK and can't get it to communicate to a DHT22 sensor.

Wiring: 3.3V on NodeMCU -> + on DHT22, Ground to - and pin D1 to signal, there is a 6.8k pull up resistor on the data line.

According to the DHT22 datasheet, the MCU has to start by pulling the data line low for a bit more then 1 ms after having it on high for 1 ms and then hast to listen to what the DHT22 is sending.

My code for doing this is the following:

gpio_output_set(_pinNumber, 0, _pinNumber, 0);
os_delay_us(START_SET_HIGH_TIME_US);
gpio_output_set(0, _pinNumber, _pinNumber, 0);
os_delay_us(START_SET_LOW_TIME_US);
gpio_output_set(0, 0, 0, _pinNumber);


I was able to verify that the NodeMCU behaves as expected by using a logic analyzer (see picture)

I ruled out a defective DHT22 by trying 3 different ones. The DHT22 doesn't answer with the data as expected.

Has anyone encountered this behavior?

• No, because those aren't available for the NonOs SDK – AronC Jul 3 '19 at 20:11
• I have my information from this library and copied how the code works. I also read through the adafruit tutorial. – AronC Jul 3 '19 at 20:15
• The datasheet states that between 3.3V and 6V is ok. I am using 3.3V, but also tried the 5V output of the NodeMCU – AronC Jul 3 '19 at 20:28
• @vicatcu Do you want to formulate your comment about using a library to check out what works, as a answer so I can accept it. I tried the adafruit library with an arduino and was able to find out, that my seller sold me a DHT11 instead of a DHT22 so my timing was off. Your comment led me to my answer. – AronC Jul 6 '19 at 14:02