This project demonstrates the capabilities of IoT (Internet of Things), combining microcontrollers with web applications, for practical uses of both front-end and back-end technologies.
A complete solution integrating an ESP8266 microcontroller with a Flask-based server.
-
Data Collection:
- The ESP8266 microcontroller reads temperature and humidity from a DHT22 sensor.
-
Data Transmission:
- Measurement data is sent in JSON format to the Flask server.
-
Storage & Visualization:
- The Flask application stores data in SQLite3 and displays it via chart.js (for charts) and DataTables (for sortable and filterable tables).
-
Integration Demonstration
Showcases the entire data flow β from sensor reading, through sending data to the server, to visual presentation. -
Education & Experimentation
A practical example of combining hardware (sensor + microcontroller) with software (server, databases, front-end). -
Scalability Potential
Thanks to the database configuration (including sensor names), the project can be expanded to handle multiple sensors and users (e.g., in smart home applications).
Backend (Python/Flask):
- Python β version 3.11
- Flask β web framework
- Flask-Session β server-side session management
- sqlite3 β database storing measurements and user info
- Additional Python libraries:
datetimeβ date and time operationsflash,jsonify,redirect,render_template,request,sessionβ Flask functions for notifications, JSON handling, redirects, templates, requests, and session handlingfunctools (wraps)β decoratorswerkzeug.securityβ password hashing and verification
Front-end & Data Visualization:
- HTML, CSS, JS β essential building blocks of the user interface
- Bootstrap β CSS framework for styling and responsiveness
- DataTables β interactive tables with sorting and filtering
- chart.js β charting library
- Jinja2 β template engine (Flask)
Hardware & Microcontroller (C/C++):
- ESP8266 β microcontroller with built-in WiFi support
- DHT22 β temperature and humidity sensor
- DHT.h, ArduinoJson.h, ESP8266WiFi.h, ESP8266HTTPClient.h
