Skip to content

Displays the current weather on a Raspberry Pi using a Pimoroni UnicornHat.

License

Notifications You must be signed in to change notification settings

SeanCline/UnicornHatWeather

Repository files navigation

UnicornHatWeather

Displays the current weather conditions on a Pimoroni Unicorn HAT or Unicorn HAT HD.

Installation

These instructions assume a fresh installation of Raspberry Pi OS Buster.

Install dependencies

sudo apt update
sudo apt dist-upgrade
sudo apt install build-essential git libgif-dev scons python python3-pip libopenjp2-7 libtiff5

Clone and build

cd ~
git clone --recursive https://github.com/SeanCline/UnicornHatWeather.git
cd UnicornHatWeather/Gif2UnicornHat
make dependencies && make
cd ..
sudo pip3 install -r requirements.txt

Configuration

  • Sign up for OpenWeatherMap and retrieve your API key from here.
  • Open config.py and replace YOUR_OPENWEATHERMAP_API_KEY with your API key.
  • Set your city by either updating the zip code or by using one of the other formats for defining your city.

Usage

sudo ./UnicornHatWeather.py

Automatic startup

In order to start the weather display whenever the Raspberry Pi is booted, run the following:

sudo cp gif.service /etc/systemd/system/gif.service
sudo systemctl daemon-reload
sudo systemctl enable gif.service

About

Displays the current weather on a Raspberry Pi using a Pimoroni UnicornHat.

Topics

Resources

License

Stars

Watchers

Forks