This project provides a real-time weather monitoring application using the SPL06-007 sensor and an Arduino board. The sensor data (temperature, pressure, altitude) is read by the Arduino and sent over a serial connection to a Python GUI application, which displays the data in a dashboard format.
This project was created by Halit Osman Efkere.
- Temperature Monitoring: Real-time display of ambient temperature.
- Pressure Monitoring: Real-time display of atmospheric pressure.
- Altitude Monitoring: Calculate and display altitude based on pressure data.
- Atmosphere Layer Detection: Determine the atmospheric layer based on altitude.
- Weather Estimation: Basic weather estimation based on pressure trends.
- Energy Efficient: Designed with a dark theme for low energy consumption.
Below is an image showing the SPL06-007 sensor connected to the Arduino:
- Arduino board (e.g., Arduino Uno)
- SPL06-007 sensor module
- USB cable for Arduino
- Arduino IDE (for uploading code to the Arduino)
- Python 3.x
- PySerial (Python library for serial communication)
- Tkinter (Python standard GUI library)
- PyInstaller (for creating executable files)
To connect the SPL06-007 sensor to the Arduino, use the following pin connections:
- 3.3V: Connect to the 3.3V pin on the Arduino.
- GND: Connect to a GND pin on the Arduino.
- SDA: Connect to the SDA (A4 on most Arduino boards like Uno).
- SCL: Connect to the SCL (A5 on most Arduino boards like Uno).
Ensure that the connections are secure and that the sensor is oriented correctly.
-
Arduino Setup:
- Open the Arduino IDE and upload the
weather_monitoring.ino
file located in thearduino_code
folder to your Arduino board.
- Open the Arduino IDE and upload the
-
Python Environment:
- Install Python 3.x from python.org.
- Install the required Python libraries:
pip install pyserial
-
Run the Python Script:
- Run
weather_monitoring.py
located in thepython_code
folder to start the GUI application.
- Run
-
Create Executable (Optional):
- To create a standalone executable, run:
pyinstaller --onefile --windowed weather_monitoring.py
- To create a standalone executable, run:
-
Flash the Arduino with the Provided Code:
- Open the Arduino IDE on your computer.
- Connect your Arduino board to your computer using a USB cable.
- Open the
weather_monitoring.ino
file located in thearduino_code
folder. - Select the correct board type and port under
Tools
in the Arduino IDE. - Click the Upload button to flash the Arduino with the code.
-
Connect the SPL06-007 Sensor to the Arduino Using I2C:
- Ensure the SPL06-007 sensor is properly connected to the Arduino's I2C pins (SDA and SCL).
-
Run the Arduino Code:
- Once the code is uploaded, the Arduino will start executing it immediately. It will read data from the SPL06-007 sensor and send the data over the serial port to your computer.
-
Run the Python Application:
- Open a terminal or command prompt in the
python_code
directory. - Run the Python script
weather_monitoring.py
to launch the GUI application. - The application will display the sensor data in real-time as it is received from the Arduino.
- Open a terminal or command prompt in the
This project is licensed under the MIT License - see the LICENSE file for details.