An e-paper display project for showing real-time public transport information in Skåne, Sweden, using a Raspberry Pi Zero and Waveshare E-Paper display.
- Raspberry Pi Zero
- Waveshare 7.5 Inch E-Paper Display Panel V2 (800x480)
- Fotoram Tallinn (Clas Ohlson picture frame 13x18)
- Micro USB charger
Since commit 7ca6a25174dcbb7ca93db777bfe5d5570ec40cbf home assistant is required to manage the mode
The display operates in different modes throughout the day:
-
Journey Mode (06:00 - 10:00)
- Shows real-time departure information for configured routes
- Displays current time, departure times, arrival times, and track numbers
- Indicates delays and cancellations with special symbols
- Split screen showing multiple routes simultaneously
-
Art Mode (10:00 - 22:00)
- Displays random artwork from the
imgfolder
- Displays random artwork from the
-
Sleep Mode (22:00 - 06:00)
- Display goes to sleep to preserve screen life
sudo raspi-config
Choose Interfacing Options -> SPI -> Yes to enable SPI interface
sudo reboot
sudo apt-get update
sudo apt-get install python3-pip python3-pil python3-numpy python3-spidev python3-gpiozero git
wget https://files.pythonhosted.org/packages/5f/57/df1c9157c8d5a05117e455d66fd7cf6dbc46974f832b1058ed4856785d8a/pytz-2025.1.tar.gz
tar -xzf pytz-2025.1.tar.gz
cd pytz-2025.1
python3 setup.py install --user
mkdir project
git clone https://github.com/Corallo/Skane-busstop.gitcat /boot/firmware/config.txt | grep dtparam=spi=on
> dtparam=spi=on
ls /dev/spi*
> /dev/spidev0.0 and /dev/spidev0.1
git clone https://github.com/waveshare/e-Paper.git
cd e-Paper/RaspberryPi_JetsonNano/
cd python/examples/
python3 epd_7in5_V2_test.pySave the following service configurations in /etc/systemd/system/display.service
[Unit]
Description=display
After=network.target
[Service]
ExecStart=/usr/bin/python3 /home/pi/project/main.py
WorkingDirectory=/home/pi/project
StandardOutput=inherit
StandardError=inherit
Restart=always
User=pi
[Install]
WantedBy=multi-user.target
Enable the service
sudo systemctl daemon-reload
sudo systemctl enable display_2.service
sudo reboot
To configure different bus routes, modify the journeys list in config/app_config.yaml:
journeys:
- from_point_id: "FROM_POINT_ID"
to_point_id: "TO_POINT_ID"
display_name: "Display Name"
max_results: 5
- from_point_id: "FROM_POINT_ID_2"
to_point_id: "TO_POINT_ID_2"
display_name: "Display Name 2"
max_results: 5To find point IDs:
- Visit skanetrafiken.se
- F12 to open the developer console -> Network
- Search for your jurney
- Find the journey request
https://www.skanetrafiken.se/gw-tps/api/v2/Journey - Get the
fromPointIdandtoPointId
quick_tutorial.mp4
- Be careful with the number of refresh of the screen, frequent update might damage the screen.
- Images for art mode should be placed in the
imgfolder
Feel free to submit issues and pull requests for improvements or bug fixes.