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 time periods (week/month/year etc.) to display top track and artist in that time
- Install python 3.7+
- Install project dependencies:
Note: Hardware-specific libraries (like
pip install -r requirements.txt
RPi.GPIO,spidev,Jetson.GPIO) are not included inrequirements.txt. You may need to install them separately depending on your Raspberry Pi or Jetson Nano setup. - Copy
.env.exampleas.envand 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 -eto 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 -eto 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
/logsdirectory 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
