Skip to content

This project reads temperature and humidity data from a DHT11 sensor using an ESP32 board running MicroPython, and displays it on a live-updating web page.

License

Notifications You must be signed in to change notification settings

kritishmohapatra/DHT11-Web-Interface-using-MicroPython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌐 ESP32 Web Server with DHT11 (MicroPython)

This project reads temperature and humidity data from a DHT11 sensor using an ESP32 board running MicroPython, and displays it on a live-updating web page.


πŸ“¦ Features

  • πŸ›°οΈ Connects to Wi-Fi
  • 🌑️ Reads real-time temperature & humidity
  • 🌐 Hosts a simple web server
  • πŸ“± Mobile + Desktop responsive
  • πŸ”„ Auto-refreshes every 5 seconds
  • πŸ’» Built using MicroPython

πŸ› οΈ Hardware Components

Component Quantity
ESP32 Dev Board 1
DHT11 Sensor 1
Breadboard 1
Jumper Wires As needed
10KΞ© Resistor 1 (optional but recommended)

βš™οΈ Circuit Diagram

Circuit Diagram

πŸ’‘ 10KΞ© resistor is connected between VCC and DATA of the DHT11 for stable communication.


🌐 Web Interface

The ESP32 serves this HTML interface to any device connected to the same Wi-Fi:

Web Interface Screenshot

✨ Auto-refreshes every 5 seconds with latest sensor data.


πŸ”Œ Wiring Setup

DHT11 Pin ESP32 Pin
VCC 3.3V
GND GND
DATA GPIO 4

πŸ’‘ How It Works

  1. ESP32 connects to your Wi-Fi network.
  2. It initializes the DHT11 sensor.
  3. Every 2 seconds, it reads temperature and humidity.
  4. It serves these values on a local web page that refreshes every 5 seconds.

πŸ§ͺ Sample Output (Serial Console)

Connected. IP: 192.168.1.42 Web server running... Client connected from ('192.168.1.17', 50762)

πŸš€ Future Improvements

  • πŸ“Š Live charts using JavaScript (Chart.js)
  • πŸ“ Save logs to file or cloud
  • πŸ“€ Send alerts via email or Telegram
  • 🌎 Deploy to internet using port forwarding

πŸ‘¨β€πŸ’» Author

  • ✍️ Kritish Mohapatra

πŸ“… Date

  • πŸ—“οΈ 29 April 2025

⭐ Like this project?

Give it a ⭐ on GitHub and share with others!

About

This project reads temperature and humidity data from a DHT11 sensor using an ESP32 board running MicroPython, and displays it on a live-updating web page.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages