Skip to content

Commit

Permalink
Cleanup Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
vwillcox committed Feb 26, 2023
1 parent f5d2958 commit c8bc088
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,24 @@ Based on the original work by [Rainer Bunger](https://github.com/rbunger/Inky-wH

![Example Screenshot](https://talktech.info/wp-content/uploads/2023/02/IMG_20230226_110708-scaled.jpg)

Icons and code table are from Erik Flowers:

[Weather Icons](https://github.com/erikflowers/weather-icons)
## Getting Weather information

The weather information is fetched from OpenWeather:

[OpenWeather](https://openweathermap.org)

Here you need to create an account and an API key. Put the code into the "weather.py" file ("api_key" variable). You also need to set your location ("lat" and "lon" variables).

The font is from David Jonathan Ross:

[Bunjee](https://github.com/djrrb/bungee)

## Setup
## Setting up the screen

The Pimoroni Inky Impression display requires a bunch of software to be installed. My recommendation is to follow the description in a Pimoroni tutorial:

[Inky Impression](https://shop.pimoroni.com/products/inky-impression)

The installation is done by executing a bash script, and it takes a while. Everything is installed for Python 2 and 3 which isn't necessary from my point of view, so you might consider deselecting version 2 in the script before running it.

## Setting up the weather icons

We need to convert Erik's SVG icons to 8 bit PNGs. I'm using the Imagemagick "mogrify" command for the bulk convert. With Erik's original SVGs this would deliver PNGs with a 30 x 30 pixel resolution which is too small. Using the mogrify's "resize" option didn't work so I changed the SVGs to 95 x 95 pixels by using a "vim" script (see below). The original SVGs are stored in a 7z-file in the "icons" folder. In the setup script "setup.sh" there is a line to remove the modified SVGs after PNG conversion (commented out, security reasons ;-) ).

The main Python file to drive the display is "weather.py".
Expand All @@ -42,7 +38,14 @@ mogrify -background white -format PNG8 *.svg
#rm *.svg
```

## Additional
you may need to run the following
```
sudo apt install 7z vim -y
```
if you are missing Vim and 7z on your Raspberry Pi

## Additional configuration

Please rename the file apikey.py.sample to apikey.py and paste in your API key from openWeatherMap.org
The Latitude and Longtitude are also now in the apikey file so that you do not accidentally share your location if you commit changes

Expand All @@ -53,6 +56,16 @@ The Latitude and Longtitude are also now in the apikey file so that you do not a
* The font is from David Jonathan Ross.
* Original code by Rainer Bunger

## Thank you too:
Icons and code table are from Erik Flowers:

[Weather Icons](https://github.com/erikflowers/weather-icons)

The font is from David Jonathan Ross:

[Bunjee](https://github.com/djrrb/bungee)


## Licensing

The weather icons and the font are licensed under [SIL OFL 1.1](http://scripts.sil.org/OFL).

0 comments on commit c8bc088

Please sign in to comment.