This repository contains the code for an IoT-based water management system that uses ESP32 boards for data acquisition and actuator control. The system includes a hc-sr04 distance sensor for water level measurement and real-time data storage in Firebase. The code is written in C and C++ using the Arduino IDE, and MySQL is used as the DBMS. The system also features a Telegram bot API for ESP32 and a state machine for controlling the water flow activation electrovalves.
- Real-time monitoring of water levels and flow.
- Intelligent control of water flow using state machines and electrovalves.
- Real-time data storage in Firebase.
- Remote control of the system using the Telegram bot API.
- 2 x ESP32 boards
- 2 x hc-sr04 distance sensor
- 2 x Electrovalves
- Water pump
- Arduino IDE
- MySQL
- Firebase
- Telegram bot API
- Upload the code to your ESP32 boards using the Arduino IDE.
- Connect the hc-sr04 distance sensor and electrovalves to the ESP32 boards.
- Configure the system settings in the code.
- Run the code and monitor the system using the Telegram bot API or the Firebase console.
- HC-SR04 sensor connection
- Solenoid valve connection