- Raspberry Pi 4
- ESP8266
- Temperature & Humidity Sensor (DHT11)
- Barometric Pressue Sensor (BMP180)
- Digital Light Sensor (BH1750FVI)
Downloading and Installing Raspberry Pi OS
Once you have all the required components, use the next steps to prepare your Raspberry Pi 4 to act as a database and webserver for your weather station system. This is where the ESP8266 sensor units will send their sensor readings for us to see in our web-browser.
The following steps will work on Linux, Windows and MacOS
- Insert a microSD card / reader into your computer
- Download and install the official Raspberry Pi Imager
- Click Choose OS and select 'Raspberry Pi OS (Other)'. Then choose 'Raspberry Pi OS Lite (64-bit)'
- Click Choose Storage and choose your SD Card
- Click the Settings icon in the bottom right corner. Set the hostname to espi-weather, enable SSH, and set your password for the 'pi' user. Please DO NOT change the username, keep it as pi or else the installer script for this project will not work properly.
- Finally, click Write
Booting Your Raspberry Pi for the First Time
Coming Soon
Preparing your Raspberry Pi for the installation scripts
In order to run the scripts that install the software for this project, we need to install Git
sudo apt install git -y
It is also recommended to set your Timezone so the system time is accurate. The following command is setting the timezone to Auckland, default for New Zealand
sudo timedatectl set-timezone Pacific/Auckland
Running the weather station install script
This script was built to configure the Raspberry Pi as a database and webserver. It will pull the latest firmware from this repository, configure the backend services, and install the web-interface where you will be able to visualise the sensor data and configure system settings
First we clone my repository into the home directory
cd ~/
git clone https://github.com/wzern/weather-pi-project
cd weather-pi-project/
Next we execute the install.sh script
sudo bash install.sh
If you encounter problems with the script, please open a new issue on this repository with a screenshot of the script's output
A short and simple permissive license with conditions only requiring preservation of copyright and license notices. Licensed works, modifications, and larger works may be distributed under different terms and without source code.
For more details, see the LICENSE file.
Made with ❤️ by William Zernikow