NodeMCU ESP8266 Monitoring DHT11/ DHT22 Temperature and Humidity with Local Web Server

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
monitoring dht11 or dht22 temperature and humidity with local web server using nodemcu esp8266 in this project we will create a standalone web server using a node mcu esp826 that displays the temperature and humidity as well as latest coronavirus statistics actually the web server we will build can be easily accessed with any device that features a browser on your local network throughout this tutorial we'll show how we build asynchronous web server which will updates the temperature and humidity automatically we don't need to refresh the web page to update the data actually we have used custom css to style the web page components required to build this project you need the following components node mcu esp8266 development board dht22 or dht11 temperature and humidity sensor node mcuesp8266 and dht11 dht22 schematic diagram interface the dht11 or dht22 temperature and humidity sensor to the esp8266 as shown in the following schematic diagram in this tutorial we're interfacing the dht data pin to gpio5 d1 but you can use any other suitable gpio pins if you're using an esp-01 gpio2 is the most suitable pin to interface to the dht data pin program sketch code importing libraries first of all import the required libraries setting your network credentials insert your network credentials in the following variables so that the esp8266 can connect to your local network define the gpio that the dht data pin is connected to in this case it's connected to gpio5d1 then select the dht sensor type you're using in our example we're using the dht11 if you're using another type you just need to uncomment your sensor and comment all the others instantiate a dht object with the type and pin defined earlier create an async web server object on port 80. create float variables to hold the current temperature and humidity values the temperature and humidity are updated in the loop create timer variables needed to update the temperature readings every 10 seconds building the web page let's see how this web page is created all the html text with styles included is stored in the index.html variable now we'll go through the hdl text and see what each part does the following tag makes your web page responsive in any browser the tag is needed to load the icons from the fontosum website between the tags we add some css to style the webpage automatic updates finally there's some javascript code in our webpage that updates the temperature and humidity automatically every 10 seconds scripts in html text should go between the tags uploading the code after modifying the sketch with the necessary changes if needed upload the code to your esp8266 make sure you have the right board and com port selected go to tools board and select the esp8266 model you're using in our case we're using the esp826612e node mcu kit also select the com port the esp8266 is connected to press the arduino ide upload button after uploading the code open the serial monitor at a boo rate of 115 200. press the esp8266 reset button the esp8266 ip address will be printed in the serial monitor as shown here demonstration in your local network go to a browser and type the esp8266 ip address it should display the following web page with the latest sensor readings this was the tutorial i hope you enjoyed watching this video please subscribe to this channel for more amazing projects on upcoming days stay home stay safe see you soon on the next video [Music] you
Info
Channel: IoT Projects Ideas
Views: 10,723
Rating: undefined out of 5
Keywords: iotprojectsideas, iot projects, iot projects ideas, iot projects ideas for students, iot project ideas 2022, iot projects using arduino, NodeMCU ESP8266 Monitoring DHT11/ DHT22 Temperature and Humidity with Local Web Server, display sensor data to nodemcu web server, nodemcu dht11 blynk, dht11 nodemcu thingspeak, nodemcu dht22 blink, dht library for esp8266, dht22 nodemcu, esp8266 dht22 + matt, esp8266 dht11/dht22 web server temperature and humidity using arduino ide, esp8266 iot
Id: C4r6RpUGe7w
Channel Id: undefined
Length: 4min 45sec (285 seconds)
Published: Tue Sep 13 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.