WeatherPi
A Mini Weather Station
A Mini Weather Station
The WeatherPi is a Raspberry Pi, credit card sized computer, hooked up with a sense HAT which itself is a compilation of various sensors with programming to automatically read them, interpret them into meaningful information and finally upload the data directly to internet. This project aims to facilitate access to localised meteorological surveillance for the masses. The WeatherPi will be able to measure temperature, relative humidity, and air pressure. The list of deliverables would include a working prototype and GUI website dashboard displaying relevant graphs , readings and data on smartphone or any mobile device.
The Raspberry Pi Sense HAT is attached on top of the Raspberry Pi via the 40 GPIO pins . The Sense HAT has several integrated circuit based sensors can be used for many different types of experiments, applications, and even games. The sensors enable you to read: Orientation (yaw, pitch & roll) via an accelerometer, 3D gyroscope and magnetometer; Pressure; Humidity;Temperature
Technical Specification:
Step 1: Creating Profile on Weather Underground.
Step 2: Adding our Weather Station.
Step 3: Creating personal weather station network.
The sense HAT assembling on the raspberry pi is really easy. We just need to mount it on the pins of raspberry pi and run the following code on the terminal of raspberry pi.
$ sudo apt-get install sense-hat
Next we create the directory for the project app files.
$ cd ~
$ mkdir pi_weather_station
$ cd pi_weather_station
The project folder contains various files. Here we will understand them one by one.
(1) config.py - This is the project's external service configuration file. It provides the weather station the details about weather underground weather station profile that is Station ID and Station key.
(2) readme.md - This set of file contains the instructions about the python code.
(3) start-station.sh - This file contains the shell script to start the weather station process.
(4) weather-station.py - This file contains the main data collection application for the project. We finally run this application to read the data from the sense HAT and upload them directly to the weather underground channel.
Since the Sense HAT has LED display, it is used to display information about the weather data. The sense HAT shows red arrow, blue arrow and an equal sign. Here's what it means:
To execute the data collection application, open the terminal window and navigate to the folder where you copied the project files.
$ python ./weather_station.py
And the application works perfectly fine.
Here a few changes have been made. Initially when we used to upload the data we needed to open the terminal and then execute the application. The changes done makes the raspberry pi to upload the data automatically to the weather underground channel without the need of execution done in the terminal window.
$ chmod +x start-station.sh
Next, we need to open the pi user's session autostart file using the following command:
$ sudo nano ~/. config/lxsession/LXDE-pi/autostart
Next, we add the following line at the bottom of the file
@lxterminal -e /home/pi/pi_weather/start_station.sh
Now, we save the changes made and then reboot the raspberry pi.
(1) Results from 25th April:
(2) Results from the 29th April:
(3) Reading from 30th April: