ESP12 and DHT22

You will learn how to conect sensors to esp8266

Step 1

What we need

For this tutorial we will need:

  1. Esp8266-12
  2. DHT22
  3. FTDI
Step 2

Learn breadboard

On pic you see how breadboard works

Step 3

ESP12 connect to DHT22

  • Connect ESP8266 as is show on picture.
Step 4

Download and install library

To use DHT22 you need appropriate library to read sensor data.

Download one here.

Install the library (follow instructions in Read-me file).

Open Arduino IDE and check that it's in a new library added to "File"->"Sketchbook"->"libraries"->"DHT22".

Step 6

Open Example code

Open example code for DHT library by clicking on "File"->"Examples"->"DHT"->"DHTTester".

Step 7

Upload code

Press upload and wait to arduino finish uploading code

Step 8

Open Serial Monitor

Open serial monitor and see values from esp8266 reading dht22 sensor.

Tutorial Forum

CityOS flag

Reading Error



I have done all the steps but still can’t read the value from the sensor?