You are on page 1of 11

(/) Let's Make ...

Featured (/featured/) Write an InstructableLogin (/account/login/) | Sign Up (/account/gopro)


(/about/create.jsp)

Classes (/classes/) Contests (/contest/) Forums (/community/?categoryGroup=all&category=all) Answers (/tag/type-question/?sort=RECENT)


(http://www.autodesk.com)

Teachers (/teachers/) advertisement

Berdagang CFD dengan


"Pialang Valas Nomor
1 di Dunia" Berdagang CFD melibatkan risiko
*Berdasarkan UK 40+ dan penghargaan kerugian yang signifikan.
internasional

advertisement

(https://cdn instructables com/FZ1/6HM8/IFMVWB8J/FZ16HM8IFMVWB8J MEDIUM jpg)

in this project using a esp8266, to show the temperature and humidity


DHT22 sensor on your smartphone or tablet.
DHT22 sensor is much more accurate than DHT11 but is also more expensive.
but if you only can use the DHT11

ESP8266-12 blynk wireless temperature e humidity DHT 11 sensor


About This Instructable
(https://www.instructables.com/id/ESP8266-12-blynk-wireless-temperature-e-
humidity-D/) License:
8 51,347 views
78 favorites
Step 1: Materials
catoplepa
ESP8266-12 Blynk Wireless Temperature, Humidity DHT22 Sensor by(/member/catoplepa/)
catoplepa (/member/catoplepa/) in arduino (/technology/arduino/)
Follow 40
Download h (/id/ESP8266-12-blynk-wireless-temperature-e-humidity-D-1/) 5 Steps . (/member/catoplepa/)
Collection I MadeMore
it! by Favorite
catoplepa: Share

(/id/ESP8266- (/id/ESP8266-
(/id/ESP8266- 12-blynk- 12-blynk-
12-blynk- wireless- wireless-
wireless- temperature- temperature-
simple- LM35- e-humidity-D-
virtual-led/) sensor/) 1/)

advertisement

(https://cdn instructables com/F11/UCM0/IFMVWM01/F11UCM0IFMVWM01 MEDIUM jpg)

(https://cdn instructables com/F1V/L0WE/IFMVWLS(https://cdn instructables com/F5I/9L0Z/IFMVWM

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

DHT11 temperature and humidity sensor

10k resistence
power regulator 3,3v-5v

Step 2: Connections
(https://cdn instructables com/F20/8HQS/IFMVWBSX/F208HQSIFMVWBSX MEDIUM jpg)

(https://cdn instructables com/FXX/VOH8/IFMVWD77/F (https://cdn instructables com/F0M/V6XE/IF

ESP8266

VCC +3,3v
CH-PD +3.3v

gpio12 ---- pin2 (DHT22)

GND ground GPIO5 ground


-----------------------------------------------

DHT22 sensor
pin 1 +3,3v

pin 2 output .---- gpoi12 (ESP8266-12)

pin4 ground
----------------------------------------------

10k resistence
pin 1 (DHT22) ---- 10k resistence---- pin 2 (DHT22)

Step 3: Blynk App


(https://cdn instructables com/FNA/OPPW/IFMVWIXD/FNAOPPWIFMVWIXD MEDIUM jpg)
(https://cdn instructables com/F3 (https://cdn instructables com/F5 (https://cdn instructables com/FC

http://www.blynk.cc/ (http://www.blynk.cc/)

------------------------------------------
store app

Blynk Apple Store (https://itunes.apple.com/us/app/blynk-control-arduino-


raspberry/id808760481?ls=1&mt=8)

Blynk Google Play store (https://play.google.com/store/apps/details?id=cc.blynk)

------------------------------------------

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
Sketch

blynk library (https://github.com/blynkkk/blynk-library/releases)

SimpleTimer library (http://playground.arduino.cc/Code/SimpleTimer)

DHT library (https://github.com/adafruit/DHT-sensor-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


Download (https://cdn.instructables.com/ORIG/F21/IN1E/IFMVWFUT/F21IN1EIFMVWFUT.ino)
blynk_esp8266_dht22

(https://cdn.instructables.com/ORIG/F21/IN1E/IFMVWFUT/F21IN1EIFMVWFUT.ino)

SimpleTimer.zip
Download (https://cdn.instructables.com/ORIG/F38/8FLS/IFMVWFW9/F388FLSIFMVWFW9.zip)
(https://cdn.instructables.com/ORIG/F38/8FLS/IFMVWFW9/F388FLSIFMVWFW9.zip)

DHT-sensor-library-ma
Download (https://cdn.instructables.com/ORIG/FGW/JL0Q/IFMVWFWZ/FGWJL0QIFMVWFWZ.zip)
(https://cdn.instructables.com/ORIG/FGW/JL0Q/IFMVWFWZ/FGWJL0QIFMVWFWZ.zip)

Step 5: Thanks
Thanks by catoplepa

advertisement

Register to get 10pcs for Free

China Prototype PCB: 2-4 days


shipping. Register now!

10pcs Free

Comments

We have a be nice comment policy.


Please be positive and constructive. w I Made it! Add Images Post Comment

cosminc16 (/member/cosminc16/) 2016-11-09 Reply

Hi , I recive value of 716 for temperature and 920 for humidity , what I can do ?

MihailA3 (/member/MihailA3/) 2015-11-10 Reply

Line an error when compiling.


timer.setInterval(1000L, sendUptime);

Reply
onorabil (/member/onorabil/) made it! . MihailA3 (/member/MihailA3/)

2016-09-02
Move the sendUptime function before the setup function, so the
compiler can see it in the current scope.
In case the above doesn't make sense, just compile the attached sketch
(replace auth token, ssid and password).

(https://www.instructables.com/static/defaultIMG/default.MEDIUM.gif)

GrzegorzK5 (/member/GrzegorzK5/) . MihailA3 (/member/MihailA3/) Reply

2015-11-21
I have the same

buraksefa (/member/buraksefa/) . GrzegorzK5 (/member/GrzegorzK5/) Reply

2016-05-27
Could you fix that problem because I have the same now

h4fod (/member/h4fod/) . MihailA3 (/member/MihailA3/) 2016-04-07 Reply

Hi MihailA3

I have same problem: 'sendUptime' function not found in current scope


when compiling sketch. Did you have a solution to this problem? I too
have checked that I have the SimpleTimer library installed. Many thanks.

Akin Yildiz (/member/Akin+Yildiz/) 2016-03-15 Reply

please make one with ds18b20 sensor on a digital pin.!!

Gumby54 (/member/Gumby54/) 2016-02-25 Reply

Hi catoplepa,

I figured out the error. I did not realize the SSID was case sensitive, that
corrected I managed to get connected. Now my issue is with the actual values; I
get -3276.7 for temp, 6553.5 for Hum.. I am using both libraries and the sketch
as is! Also using a dht22 3 pins breakout board. Any idea where I made a
mistake?

catoplepa (/member/catoplepa/) 2016-02-19 Reply

Hi Gumby54
I'm sorry but I do not know Acrobotic ESP8266-12E

Gumby54 (/member/Gumby54/) 2016-02-19 Reply

Cant get it to work. I am using Acrobotic ESP8266-12E gpio12 is on pin D6 on


this dev board. What should I use as pin number in the sketch? It seems to load
on the board but get nothing on my phone. The ide shows this at the bottom:

ploading 224880 bytes from


/var/folders/0t/_yjn0r253bn11hlrdxszz7_w0000gs/T/build6298255724161252052.tmp/blynk_esp8266_dht22_instructable.cpp.bin
to flash at 0x00000000
................................................................................................................................................................................................................

Any suggestions would be appreciated

Akin Yildiz (/member/Akin+Yildiz/) 2016-02-16 Reply

how can you also display data on arduino IDE serial monitor and set too
high/low values and based on these values send out an email;
Blynk.email("my_email@example.com", "Subject", "Your message goes
here");

so it can actually alarm us "greenhouse too cold" thank you for your time.!!
https://www.instructables.com/id/ESP8266-12-blynk-w...
(https://www.instructables.com/id/ESP8266-12-blynk-wireless-temperature-e-
humidity-D/?comments=all#CPVSYF5IKPS5TUW)

Vegetish (/member/Vegetish/) 2016-02-16 Reply

This works, but when i connect to blynk it seems that the connection keeps
jumping out, then back in again. The gauge shows the right values, then goes
to blank (--), then back to the right value, over and over again. Might there be
an issue with the code that causes a continuous disconnect?

catoplepa (/member/catoplepa/) 2015-12-12 Reply

Hi druid001

There are several ways to program the esp8266, I preferred to specify the way
in which I have uploaded the sketch.

I also specify not to use the USB to power the esp8266

druid001 (/member/druid001/) 2015-12-11 Reply

First time doing something like this. I don't understand the comment "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)

catoplepa (/member/catoplepa/) 2015-11-22 Reply

Hi Grzegorzk5

I use Arduino IDE 1.6.5 and it works fine, but if I use Arduino IDE 1.6.6 to me
gives me the same error.
It could be a problem of libraries

GrzegorzK5 (/member/GrzegorzK5/) . catoplepa (/member/catoplepa/) Reply

2015-11-22
thanks

GrzegorzK5 (/member/GrzegorzK5/) 2015-11-22 Reply

Line an error when compiling.

timer.setInterval(1000L, sendUptime);

Arduino ID1.6.6
please help

catoplepa (/member/catoplepa/) 2015-11-12 Reply

hi, MihailA3
you have found a mistake in my sketch? or have you copied the sketch wrong?
what kind of change you made

Thanks

Catoplepa

MihailA3 (/member/MihailA3/) 2015-11-12 Reply

Slightly modified the code and everything worked.

catoplepa (/member/catoplepa/) 2015-11-11 Reply

Hi, MihailA3

Please check that you have library SimpleTimer in the folder

Thanks

catoplepa (/member/catoplepa/) 2015-10-31 Reply

Hi, Mihe T55

yes is possible...try to test these sketch


#define BLYNK_PRINT Serial //

#include <ESP8266WiFi.h>

#include <BlynkSimpleEsp8266.h>

#include <SimpleTimer.h>
#include <DHT.h>

// first DHT22

#define DHTPIN 12 //pin gpio 12 in sensor

#define DHTTYPE DHT22 //


DHT dht(DHTPIN, DHTTYPE);

// second DHT22

#define DHT1PIN 13 //pin gpio 13 in sensor

#define DHT1TYPE DHT22 //


DHT dht(DHT1PIN, DHT1TYPE);

// You should get Auth Token in the Blynk App.

// Go to the Project Settings (nut icon).

char auth[] = "xxxxxxxxxx"; //


SimpleTimer timer;

void setup()

Serial.begin(9600); //
Blynk.begin(auth, "ssid", "password!"); //
// Setup a function to be called every second

timer.setInterval(1000L, sendUptime);

void sendUptime()
{

// You can send any value at any time.

// Please don't send more that 10 values per second.

//Read the Temp and Humidity from DHT


// first DHT22

float h = dht.readHumidity();

float t = dht.readTemperature();

Blynk.virtualWrite(10, t); // virtual pin 10


Blynk.virtualWrite(11, h); // virtual pin 11

// second DTH22

float h1 = dht.readHumidity();

float t1 = dht.readTemperature();
Blynk.virtualWrite(12, t1); // virtual pin 12

Blynk.virtualWrite(13, h1); // virtual pin 13

void loop()
{

Blynk.run();

timer.run();

MikeT55 (/member/MikeT55/) 2015-10-30 Reply

hello, is it possible to combine two diferents circuits and comunite via phone?
for example, I have two rooms and I want to check both temperatures, so I can
chose circuit one for my room and see the temperature, if I want to check my
brothers room it will be circuit 2.

catoplepa (/member/catoplepa/) 2015-10-18 Reply

you have in the folder, multiple versions of the same library

GrzegorzK5 (/member/GrzegorzK5/) . catoplepa (/member/catoplepa/) Reply

2015-10-18
thanks tohelp

catoplepa (/member/catoplepa/) 2015-10-18 Reply

Hi, GrzegorzK5
the sketch is very simple, you try to verify links or virtualpin on the blynk app

in the IDE arduino i use 4M (3M SPIFFS)


I More Comments

Newsletter About Us
Let your inbox help you discover our best Who We Are (/about/)
projects, classes, and contests. Instructables Advertise (/advertise/)
will help you learn how to make anything! Contact (/about/contact.jsp)
Jobs (/community/Positions-available-at-Instructables/)
enter email I'm in!
Help (/id/how-to-write-a-great-instructable/)
Find Us Resources
Facebook (http://www.facebook.com/instructables) For Teachers (/teachers/)
Youtube (http://www.youtube.com/user/instructablestv) Residency Program (/pier9residency)

Twitter (http://www.twitter.com/instructables) Gift Premium Account (/account/give?sourcea=footer)


Forums (/community/?categoryGroup=all&category=all)
Pinterest (http://www.pinterest.com/instructables)
Answers (/tag/type-question/?sort=RECENT)
Google+ (https://plus.google.com/+instructables)
Sitemap (/sitemap/)

Terms of Service (http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21959721) |


Privacy Statement (http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21292079) |
Legal Notices & Trademarks (http://usa.autodesk.com/legal-notices-trademarks/) | Mobile Site (https://www.instructables.com)
(http://usa.autodesk.com/adsk/servlet/pc/index?id=20781545&siteID=123112)
2017 Autodesk, Inc.

You might also like