raspberrypi.org/magpi May 2018 71
BUILD A WEATHER STATION Feature
raspberrypi.org/magpi July 2018 71
SOFTWARE DOWNLOAD
You’ll need the Oracle Raspberry Pi Weather Station
software. You don’t need to install it, but you’ll use some
of the Python programs. Clone the GitHub repository by
opening a Terminal window and typing:
git clone https://github.com/
RaspberryPiFoundation/weather-station
Now install the BME280 Python library:
sudo pip3 install RPi.bme280
You can find more information on this library at the
Python Package Index (magpi.cc/dhSyei).
And install the MariaDB database server software:
sudo apt-get install -y mariadb-server mariadb-
client libmariadbclient-dev
sudo pip3 install mysqlclient
The wind vane detects
the direction the wind
is coming from
The smaller box contains
a BME280 integrated
environmental sensor.
This provides data on
the humidity, pressure,
and temperature
A 3D-printable mount
is used to secure the
Raspberry Pi inside
the larger box
The anemometer has
three arms with scoops
on the end that catch the
wind and cause the arms
to spin. This measures
the wind speed