A python based raspberry pi program that can run periodically to display various data points on an Waveshare e-ink display (I have created it for a 4.2 inch display but it is easily adaptable from others).
This was forked from the great work of Rachel Bitting, thanks for setting up a great groundwork for me to work off of!
The display currently shows:
- Date
- Weather
- Sunrise/sunset
- London underground line status
- CO2 monitoring
- Last.fm data that cycles between
- Install python 3.7+
- Copy
.env.example
as.env
and add your OpenWeatherMap and Last.fm api keys
This set-up guide assumes you are running Raspbian on your Pi and have already set up internet access.
-
Complete the Waveshare hardware/software set-up instructions for your relevant screen.
-
Set up a cron job to run the display refresh at regular intervals. Enter the command
crontab -e
to edit the crontab file. Then add the following line (this will run the script every 30 minutes):*/30 * * * * cd /home/pi/repos/pi-display/python && python3 main.py
-
Set up a cron job to run the display refresh on Pi start-up. Enter the command
crontab -e
to edit the crontab file. Then add the following line:@reboot sleep 30 && cd /home/pi/repos/pi-display/python && python3 main.py &
-
Reboot the Pi for all updates to take effect.
- All logs are stored under the
/logs
directory on your Pi
-
If display is printing incorrect times, you may need to update the timezone of your Pi:
sudo raspi-config
->Internationalisation Options
->Change Timezone
-> Follow screen directions to change country and time zone -
If you receive errors around the font files, update the font permissions:
chmod 744 assets/fonts