🚀 A real-time IoT-based Air Quality Monitoring System powered by ESP32 + Gas & Dust Sensors.
The system streams live environmental data to ThingSpeak, processes it with a Flask backend, and visualizes it on a modern, animated dashboard.
It also integrates Machine Learning models for:
- 📈 Predicting air quality trends
⚠️ Detecting anomalies in sensor readings- 🧠 Providing intelligent insights & alerts
✅ Real-time air quality monitoring with ESP32
✅ ThingSpeak integration for IoT data storage & retrieval
✅ Flask-based dashboard with 3 tabs:
- Live Data
- Past Analysis
- About Project
✅ Machine Learning models for prediction & anomaly detection
✅ Interactive charts & visualizations (Charts.js, Matplotlib)
✅ Modern UI/UX with animated backgrounds 🌈
- Hardware: ESP32 + MQ-2, MQ-7, MQ-135, Dust Sensor
- Firmware: Arduino IDE (C++ for ESP32)
- Backend: Python (Flask)
- Frontend: HTML + CSS + Bootstrap (with animated background 🎨)
- IoT Cloud: ThingSpeak
- Visualization: Charts.js / Matplotlib
- Machine Learning:
- Regression models for AQI prediction
- Classification models for hazard detection
- Time-series forecasting for trend analysis
Upload the ESP32 code using Arduino IDE.
Make sure to set your Wi-Fi SSID, Password, and ThingSpeak API key in the code.
# Clone repo
git clone https://github.com/<your-username>/<repo-name>.git
cd <repo-name>
# Create & activate virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Run server
python app.py```
📊 Dashboard Tabs
1️⃣ Current Values → live ESP32 readings (fetched via ThingSpeak API)
2️⃣ Past Analysis → historical charts + ML insights
3️⃣ About → project details & scope
🚀 Future Enhancements
🌐 MQTT support for faster real-time updates
📲 Mobile app integration (Flutter/React Native)
🤖 Advanced ML for AQI forecasting
☁️ Cloud deployment on AWS/GCP/Azure
📌 Project Status
🟢 Active Development – ML model improvements coming soon!
📬 Contact
👩💻 Developer: Vijaya Lakshmi M, Chindhana K, Harshini Ganga T S