ESP32-Web-Server-with-Temperature-and-Humidity-Monitoring

ESP32 Web Server with Temperature and Humidity Monitoring

This project implements a web server on an ESP32 microcontroller that displays temperature and humidity data from a DHT11 sensor and allows control of two GPIO pins through a web interface.

Features

Hardware Requirements

Software Dependencies

Installation

  1. Install the Arduino IDE and ESP32 board support.
  2. Install the required DHT sensor library.
  3. Clone this repository or download the source code.
  4. Open the .ino file in Arduino IDE.
  5. Update the WiFi credentials in the code:
    const char* ssid = "your_SSID_here";
    const char* password = "your_PASSWORD_here";
    
  6. Upload the code to your ESP32.

Usage

  1. Power on the ESP32.
  2. The device will connect to the specified WiFi network.
  3. Once connected, it will print its IP address to the Serial Monitor.
  4. Open a web browser and navigate to the IP address.
  5. The web interface will display temperature and humidity data, and buttons to control the GPIO pins.

Web Server Communication

HTTP Request Format

HTTP Request Format

This image shows the typical format of an HTTP request. The ESP32 web server processes these requests to determine which actions to take.

HTTP Response Format

HTTP Response Format

This image illustrates the format of an HTTP response. The ESP32 sends responses in this format, including the HTML content for the web interface.

System Architecture

System Architecture

This diagram shows the overall system architecture:

Contributing

Contributions to improve the project are welcome. Please feel free to submit a Pull Request.

Profile

Check out my GitHub profile: Esmail Sarhadi

View this project on GitHub: ESP32-Web-Server-with-Temperature-and-Humidity-Monitoring

Donation

If you find this project helpful, consider making a donation:

Crypto donation button by NOWPayments

License

This project is open-source and available under the MIT License.

If you find this project helpful, consider making a donation:

Crypto donation button by NOWPayments