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

Step 1: Materials

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

DHT11 temperature and humidity sensor

10k resistence

power regulator 3,3v-5v

Step 2: Connections


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



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

DHT 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: Thanks

Thanks by catoplepa

<p>Hi , I recive value of 716 for temperature and 920 for humidity , what I can do ?</p>
<p>Line an error when compiling.</p><p>timer.setInterval(1000L, sendUptime);</p>
<p>Move the sendUptime function before the setup function, so the compiler can see it in the current scope.</p><p>In case the above doesn't make sense, just compile the attached sketch (replace auth token, ssid and password). </p>
<p>I have the same</p>
<p>Could you fix that problem because I have the same now</p>
<p>Hi MihailA3</p><p>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.</p>
please make one with ds18b20 sensor on a digital pin.!!
<p>Hi catoplepa,</p><p>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?</p>
<p>Hi Gumby54</p><p>I'm sorry but I do not know Acrobotic ESP8266-12E</p>
<p>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: </p><p>ploading 224880 bytes from /var/folders/0t/_yjn0r253bn11hlrdxszz7_w0000gs/T/build6298255724161252052.tmp/blynk_esp8266_dht22_instructable.cpp.bin to flash at 0x00000000</p><p>................................................................................................................................................................................................................</p><p>Any suggestions would be appreciated</p>
<p>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;<br><strong>Blynk.email(&quot;my_email@example.com&quot;, &quot;Subject&quot;, &quot;Your message goes here&quot;);</strong><br></p><p>so it can actually alarm us &quot;greenhouse too cold&quot; thank you for your time.!!<br><a href="https://www.instructables.com/id/ESP8266-12-blynk-wireless-temperature-e-humidity-D/?comments=all#CPVSYF5IKPS5TUW">https://www.instructables.com/id/ESP8266-12-blynk-w...</a><br></p>
<p>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?</p>
<p>Hi druid001</p><p>There are several ways to program the esp8266, I preferred to specify the way in which I have uploaded the sketch.</p><p>I also specify not to use the USB to power the esp8266</p>
<p>First time doing something like this. I don't understand the comment &quot;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)</p>
<p>Hi Grzegorzk5</p><p>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.</p><p>It could be a problem of libraries</p>
<p>Line an error when compiling.</p><p>timer.setInterval(1000L, sendUptime);</p><p>Arduino ID1.6.6</p><p>please help</p>
<p>hi, MihailA3</p><p>you have found a mistake in my sketch? or have you copied the sketch wrong? what kind of change you made</p><p>Thanks</p><p>Catoplepa</p>
<p>Slightly modified the code and everything worked.</p>
<p>Hi, MihailA3</p><p>Please check that you have library SimpleTimer in the folder</p><p>Thanks</p>
<p>Hi, Mihe T55</p><p>yes is possible...try to test these sketch</p><p>#define BLYNK_PRINT Serial // </p><p>#include &lt;ESP8266WiFi.h&gt;</p><p>#include &lt;BlynkSimpleEsp8266.h&gt;</p><p>#include &lt;SimpleTimer.h&gt;</p><p>#include &lt;DHT.h&gt;</p><p>// first DHT22</p><p>#define DHTPIN 12 //pin gpio 12 in sensor</p><p>#define DHTTYPE DHT22 // </p><p>DHT dht(DHTPIN, DHTTYPE);</p><p>// second DHT22</p><p>#define DHT1PIN 13 //pin gpio 13 in sensor</p><p>#define DHT1TYPE DHT22 // </p><p>DHT dht(DHT1PIN, DHT1TYPE);</p><p>// You should get Auth Token in the Blynk App.</p><p>// Go to the Project Settings (nut icon).</p><p>char auth[] = &quot;xxxxxxxxxx&quot;; // </p><p>SimpleTimer timer;</p><p>void setup()</p><p>{</p><p>Serial.begin(9600); // </p><p>Blynk.begin(auth, &quot;ssid&quot;, &quot;password!&quot;); //</p><p>// Setup a function to be called every second</p><p>timer.setInterval(1000L, sendUptime);</p><p>}</p><p>void sendUptime()</p><p>{</p><p>// You can send any value at any time.</p><p>// Please don't send more that 10 values per second.</p><p>//Read the Temp and Humidity from DHT</p><p>// first DHT22</p><p>float h = dht.readHumidity();</p><p>float t = dht.readTemperature();</p><p>Blynk.virtualWrite(10, t); // virtual pin 10</p><p>Blynk.virtualWrite(11, h); // virtual pin 11</p><p>// second DTH22</p><p>float h1 = dht.readHumidity();</p><p>float t1 = dht.readTemperature();</p><p>Blynk.virtualWrite(12, t1); // virtual pin 12</p><p>Blynk.virtualWrite(13, h1); // virtual pin 13</p><p>}</p><p>void loop()</p><p>{</p><p>Blynk.run();</p><p>timer.run();</p><p>}</p>
<p>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.</p>
<p>you have in the folder, multiple versions of the same library</p>
<p>thanks tohelp</p>
<p>Hi, GrzegorzK5</p><p>the sketch is very simple, you try to verify links or virtualpin on the blynk app</p><p>in the IDE arduino i use 4M (3M SPIFFS)</p>

About This Instructable




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