Read temperature and humidity from nodemcu ESP12E with DHT11 and show it on HTML webpage(Local)

Read temperature and humidity from nodemcu ESP12E with DHT11 and show it on HTML webpage(Local)-part1

Introduction

In this tutorial, we are going to Read temperature and humidity from nodemcu ESP12E with DHT11 and show it on HTML webpage locally. Note that we would be able to see the temperature and humidity from dht11 connected to esp12e nodemcu if your laptop from which you are opening the webpage and the esp12e nodemcu is connected in the same wifi network. This part basically covers to code the esp12e nodemcu with the C code such that, when we will send the get request from a web browser, the esp12e nodemcu will return the temperature and humidity by reading it from the DHT11 sensor and showing it in a JSON format. The json format is easy to decode. We will also test the get request in the browser. Just follow the below video where I have explained the step wise procedure to do that.

(Note : If you are seeing this tutorial directly then visit the below link for starting from beginning :

Read temperature and humidity from nodemcu ESP12E with DHT11 and show it on HTML webpage(Local)

)

 

Please follow the instructions carefully mentioned in the above video. Also make sure that your connections are perfect.

Now copy the below code and follow the instructions which I have stated early in the video. Don't forget to replace your "SSID" & "Password" of your hotspot or wifi in the below code.

I hope that you enjoyed my this part of tutorial. In the next lesson we will send the request through a customized webpage which we will be creating from scratch. We will send a get request to our esp12e nodemcu with dht11 in return it will sent the data in the json format.

Please login to get access to the quiz
Setting up breadboard for displaying dht11 data from nodemcu on html webpage(local) (Prev Lesson)
(Next Lesson) Read temperature and humidity from nodemcu ESP12E with DHT11 and show it on HTML webpage(Local)-part2
Back to Read temperature and humidity from nodemcu ESP12E with DHT11 and show it on HTML webpage(Local)

Comments ( 11 )

  • Student

    Hello . thanks for wonderful lesson. I have a question.
    I set up breadboard, arduino, nodemcu(esp8266) following your lesson and
    copy your code and upload it. I success uploading code but I can’t see anything in the serial monitor. In youtube, I can check temp and hum in webpage to ipadress/data
    but I can’t check ipadress in serial monitor. How can I solve this problem?

    • Most of the time its minor things you miss. Please just don’t copy paste things. I have explained everything in video. Carefully watch it again. A lot of people have already executed it successfully.

  • Epfam126

    hello thanks for wonderful lesson.
    if I can’t check ip in the serial monitor what should I have to do?
    I can’t see nothing on the serial moniter

  • Hello , Thanks for wonderful lesson.
    I follow your lesson, but I can’t check ip in serial monitor.
    There are nothing displayed in serial monitor.
    what is my problem?

  • Alavi

    Hi. I upload this code to arduino, but when I input ip on google this error
    client.print(“{\”Response\”: “);
    client.print(“Invalid”);

  • Bill

    Please Sir, can i use ESP-01 to execute the same process?

  • Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /storage/ssd3/802/7262802/public_html/db_connect.php:27
    i have this error
    line no 27 is this
    $con = mysql_connect(DB_SERVER,DB_USER,DB_PASSWORD) or die(mysql_error());
    i also config it well

    • Your php version is not correct. Please set it to what was specified in the tutorial.

Post a Reply