The Sky Quality Meter (SQM) project is designed to measure the quality of the night sky by analyzing light pollution and various environmental parameters. It consists of two main components:
- Flask Backend: A Python-based server application that processes and visualizes the data collected from sensors.
- ESP32 Firmware: A microcontroller-based software that reads sensor data and communicates with the server.
- Measures light pollution and other environmental factors using multiple sensors.
- Sends sensor data via Wi-Fi to a Flask-based server.
- Displays real-time data on a web interface.
- Stores measurement data in ASCII format for further analysis.
- Can activate an additional seeing measurement device if conditions are suitable.
- Uses power-saving techniques to extend operational life.
- Python 3.8+
- ESP32 microcontroller
- PlatformIO for firmware development
- Required Python packages (
Flask
,requests
, etc.)
- Navigate to the
flask-backend
directory:cd flask-backend
- Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
- Install dependencies:
pip install -r requirements.txt
- Run the server:
python app.py
- Install PlatformIO:
or via the VS Code Extention
pip install platformio
- Navigate to the firmware directory:
cd esp32
- Compile and upload the firmware:
pio run --target upload
- The Flask web interface is accessible via the local IP of the server.
- The ESP32 periodically sends sensor data, which can be visualized on the web interface.
- Data logs are stored in the
backend/data
directory.
- If the ESP32 is not connecting, check Wi-Fi credentials in
wifi.cpp
. - If the web server fails to start, ensure all dependencies are installed.
- For detailed debugging, check
docs/troubleshooting.md
.
This project is licensed under the GNU General Public License v3.0.
- Developed as part of a diploma thesis at HTL Hollabrunn.
- Special thanks to Dipl.-Ing. Dr. Anton Bergauer and Dipl.-Ing. Josef Reisinger for their guidance.