This is an IoT project developed using an ESP32 module. It leverages the ESP32's Wi-Fi capabilities to serve a web page that displays the moisture level of a plant's soil in real-time.
The project uses Server-Sent Events (SSE) to push updates from the ESP32 to a web client without the need for the client to refresh the page.
- Real-time soil moisture level monitoring via a web interface.
- Non-blocking web server implementation on ESP32 using
ESPAsyncWebServer. - Real-time updates to the web page using Server-Sent Events (SSE).
- ESP32 Development Board
- Soil Moisture Sensor (connected to AOUT_PIN)
- OLED Display (128x64, connected via SPI)
- Optional: LEDs or other indicators for direct feedback from the device
- Connect the Hardware: Follow the wiring instructions for your specific ESP32 module and peripherals.
- Configure Wi-Fi: Update the
ssidandpasswordvariables in the code to match your Wi-Fi network credentials. - Install Dependencies: Make sure to install all required libraries through the Arduino IDE or your preferred development environment.
- Upload the Sketch: Compile and upload the sketch to your ESP32.
After uploading the sketch and connecting the ESP32 to your Wi-Fi network, the device will start monitoring the soil moisture level. To view the moisture level:
- Open a web browser on a device connected to the same Wi-Fi network.
- Enter the IP address of the ESP32 (displayed in the Serial Monitor after connecting to Wi-Fi).
- The web page will display the current moisture level, which updates in real-time.
The HTML/CSS for the web interface is embedded within the sketch. You can modify the htmlContent string to customize the appearance of the web page. Additional plant-themed elements or styles can be added to enhance the user experience.