Let’s now see how to configure the hardware for the sensor module. Thanks to the Adafruit ESP8266 board, it is really simple to build this module on a breadboard.
The first step is to place the ESP8266 breakout board on the breadboard, as well as the DHT sensor. Then, connect the V+ (or VCC) pin from the ESP8266 board to the first pin of the DHT sensor (look at the picture below).
After that, connect the GND pin of the ESP8266 to the last pin of the DHT. Finally, connect pin number 5 of the ESP8266 breakout board to the pin number 2 of the DHT sensor.
This is the final result:
As mentioned before, you will see that I used a DHT11 sensor on this picture. However, the code you will find on GitHub is made for the DHT22 sensor, and I really suggest using a DHT22 sensor as it is more precise.