Skip to content

A weather station on RPi Zero2W and Waveshare 2.13inch display that works with the OpenWeatherMap API

Notifications You must be signed in to change notification settings

Francesco-h/WeatherStation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

To start with this project you only need a RPi Zero2W (it should work the same with a RPi Zero W/WH) and a 2.13 inch E-ink display.

First of all after the installation of Raspberry PI OS , you can access your device through SSH and enable the SPI interface so that the display can work. In order to do that you need to send the command :

sudo apt update && sudo apt upgrade
sudo raspi-config

After that you can download the repo with:

git clone [https://github.com/utente/repo.git](https://github.com/Francesco-h/WeatherStation.git)
cd WeatherStation

Now you have to change the weather.py file setting your OpenWeatherMap API , your city (the default City is Messina,IT) and the language for the api response API:

owm = OWM("<YOUR_API_KEY>", config_dict)

City:

city='Messina,IT'

lang:

config_dict['language'] = 'it'

Finally everything should work , if you want to update data automatically just change your crontab :

crontab -e

add the line:

*/5 * * * * /usr/bin/python3 YOUR_PATH/WeatherStation/weather.py

with this cron function it will update every 5th minute (ex. 00:00 , 00:05 , 00:10 ecc.). If you want to change this rate , just modify the cron function , if you don't know how just use this webpage : https://crontab.guru/

RPizero2W

About

A weather station on RPi Zero2W and Waveshare 2.13inch display that works with the OpenWeatherMap API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages