Introduction: ESP8266-12 Blynk Wireless Temperature, Humidity DHT 11 Sensor

Picture of ESP8266-12 Blynk  Wireless Temperature, Humidity DHT 11 Sensor

in this project using a esp8266, to show the temperature and humidity DHT11 sensor on your smartphone or tablet.


the esp8266-12 runs at 3.3V but many sensors operate at 5v, we will use a level logical bidirectional converter to be able to connect.

This project is linked to the previous ones, are more projects that can work together to create an automated home.

ESP8266-12 standalone blynk control outlets wireless 433 mhz

Esp8266-12 blynk wireless electric power meter

Step 1: Materials

Picture of Materials

ESP8266-12 (esp8266-7, ...... , esp8266-12e)

level logic converter bidirectional 3,3v -- 5v

DHT11 temperature and humidity sensor

power regulator 3,3v-5v

Step 2: Connections

Picture of Connections


VCC +3,3v

CH-PD +3.3v

gpio12 ---- RX0 (low level logic converter)

GND ground

GPIO5 ground


logic converter bidirectional

HV +5v

GND ground

RXI --- pin 2 (DHT11)

LV +3,3v

GND ground

RX0 -----gpio12 (ESP8266-12)


DHT11 sensor

pin 1 +5v

pin 2 output .---- RXI (high level logic converter)

pin4 ground

Step 3: Blynk App

Picture of Blynk App


store app

Blynk Apple Store

Blynk Google Play store


configure blynk

create new project ( use hardware model esp8266 )

generate AUTH TOKEN

send E-mail TOKEN ( copy TOKEN in the esp8266 sketch)

in the app Blynk use Value Display widget or Gauge widget

Step 4: Sketch


blynk library

SimpleTimer library


to programming the ESP8266-12, I use ide arduino 1.6.5 and CP2102 3.3V USB To UART Serial Interface Module Adaptor ( do not connect the power of the CP2102 to esp8266-12).


ESP8266 sketch
change the sketch in the following lines with your data

char auth[] = "xxxxxxxxxx"; //insert here your token generated by Blynk

Blynk.begin(auth, "ssid", "password!"); //insert here your SSID and password

Step 5: Thaks

Thanks by catoplepa


beta-tester made it! (author)2016-01-08

I made on NodeMCU 1.0

My sketch:

#define BLYNK_PRINT Serial // Comment this out to disable prints and save space

#include <ESP8266WiFi.h>

#include <BlynkSimpleEsp8266.h>

#include <DHT.h>

#include <SimpleTimer.h>

#define DHTPIN 12

#define DHTTYPE DHT11


SimpleTimer timer;

float humidity, temp_f; // Values read from sensor

char auth[] = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; //insert here your token generated by Blynk

void setup()


Serial.begin(9600); // See the connection status in Serial Monitor


Blynk.begin(auth, "xxxxxxxxxxxxxx", "xxxxxxx"); //insert here your SSID and password

timer.setInterval(1000, sendData);


void sendData()


//Read the Temp and Humidity from DHT

float h = dht.readHumidity();

float t = dht.readTemperature();

//Write values to V04 and V05

Blynk.virtualWrite(4, h);

Blynk.virtualWrite(5, t);


void loop()



Lessard20 (author)beta-tester2017-03-13

Thanks for the code!

JakeH95 made it! (author)2016-11-24

Great project.

I made it with an ESP8226-01 and was able to improve the stability of the DHT11 by adding a separate 3.3 volt power supply with an LM1117 3.3 and following tarikgan's modifications which was to:

- Increase the time interval to 2 seconds
- define the chk outside the loop function
- move to start of sendUpTime function

kaju666 (author)2016-11-04

How to change this projest to use only 3,3 voltage? DHT11 don't need 5v.

Akin Yildiz made it! (author)2016-02-17

i made mine email alarm below 5C and above 40C for a greenhouse project. can easily change the too high/low temps. i'm using huzzah esp8266 board with DHT11 on gpio5


the phone app can also alarm when device is offline (this is done on the app side)

blynk is extremely simple to use and very effective. thank you for all your help, everybody.!!

smartie91 (author)2016-02-15

i cannot believe there is some many codes on instrutables which will not compile including this one

catoplepa (author)2016-02-15

I have not changed anything, the pins enter without force and without having to bend

leenowell1 (author)2016-02-15

Thanks very much for getting back to me. Looking at the link, they look like the same ones that I have. How did you get them to have an electrical connection to the holes on your esp-12? As far as I can see the copper connection is on the top only so putting the jumper wire in wouldn't connect. Also, do you push it straight through into the breadboard itself - assume you would need to bend the jumper?

catoplepa (author)2016-02-13

I use this cables

leenowell1 (author)2016-02-13


Perhaps a silly question but.... What wires are you using to connect the esp to the breadbaord? They look like they connect into the esp holes and form an electrical connection. These are exactly what I am looking for

catoplepa (author)2016-02-09

thanks for the comments, I will test the proposed changes and possibly will revise the sketch

tarikgan (author)2016-02-08

hello Akin.
My wiring is stated in the picture. I think it is pretty clear to follow.
I have uploaded my code to GitHub, you can check there:

iolanda1 (author)2015-12-11

Hey there thanks for sharing this awesome project of yours, I have one little question how do you change "celsius to Fahrenheit" in your sketch code?

tarikgan made it! (author)2015-11-30

Great project.

I try to use your code but it seems inconsistent, may be because the limitation of DHT11 sample rate.

I was successful to get better data by:
- Increase the time interval to 2 second
- define the chk outside the loop function
- move to start of sendUpTime function

catoplepa (author)2015-11-11

Hi homerruma

I added the library in the step 4


homerruma (author)catoplepa2015-11-12

Okay thank you.

homerruma made it! (author)2015-11-11


where to find DHT 11 library?

catoplepa (author)2015-11-03

Hi, ErwinW4

I think it's possible, but I do not have that version to test



ErwinW4 (author)2015-11-03

Hey nice project.

Is it also possible with ESP8266-1?

About This Instructable




More by catoplepa:ESP8266-12 blynk wireless simple virtual ledESP8266-12 blynk wireless temperature LM35 sensorESP8266-12 blynk wireless temperature, humidity DHT22 sensor
Add instructable to: