Setting up the Raspberry Pi
This guide will walk you through the steps to set up the Raspberry Pi for the waiting time display.
It assumes some familiarity with the Raspberry Pi and the command line for the initial setup (step 1), after which the device can be configured via the web interface. (For example, you can pre-setup the device and let the end user just connect to WiFi and configure the display in Step 2).
For advanced users, there is a more manual setup guide here.
Step 1: Initial Setup (Developer)
Prepare the SD card
Using Raspberry Pi Imager, download the Raspberry Pi OS Lite (64-bit) or Raspberry Pi OS Desktop (64-bit) image onto a microSD card.
Under settings:
- Enable SSH
- Set up username and password
- Input WiFi network name and password
- Check the hostname (default is raspberrypi.local)
Initial Hardware Assembly
The hardware setup is quite straightforward:
- If you have a case, follow the instructions in the case’s documentation. With the case I had, this included:
- Adding a thermal pad to the bottom of the case
- Screwing the Raspberry Pi into the case with 4 screws
- Removing the film from the back of the screen and sticking it to the top of the case
- Carefully aligning the pin sockets on the display with the pins on the Raspberry Pi and firmly pressing them together
- Plug in the microSD card
- Plugging in the display to either USB-C (with the adapter) or micro-USB (important, that one USB port is for power only, the second for data, this is marked on the case)
- Without a case, you just need to press the display into the Raspberry Pi, making sure that you seat the screen firmly onto the pins (the bottom of the display’s board should more or less touch the top of the Raspberry Pi’s board), and plug in the microSD card.
Initial Software Setup
- Power on the Raspberry Pi and wait for it to connect to WiFi
- Connect to it via SSH:
ssh <username>@raspberrypi.local
- Download and run the setup script:
# Download the setup script (with cache bypass) curl -H "Cache-Control: no-cache" -O https://raw.githubusercontent.com/bdamokos/rpi_waiting_time_display/main/setup_display.sh # Make it executable chmod +x setup_display.sh # Run the setup script sudo ./setup_display.sh
The script will guide you through several configuration options:
- Setup mode (Normal/Docker/Remote)
- Display type (e.g., epd2in13g_V2 for 4-color displays, epd2in13_V4 for black and white displays)
- Update mode (Releases/Main/None)
- Optional Samba file sharing setup
- Auto-restart preference
The script will then:
- Enable SPI interface
- Install all required packages
- Set up watchdog
- Clone repositories
- Set up virtual environment
- Install requirements
- Configure and start the service
- Set up WebSerial support (will require a reboot)
If the script needs to enable WebSerial support, it will:
- Enable the required hardware module
- Reboot the system
- After reboot, you’ll need to run:
sudo bash ~/display_programme/docs/service/setup_webserial.sh
to complete the WebSerial setup.
- Reboot your device again. Once it boots up, you can access the WebSerial interface at https://bdamokos.github.io/rpi_waiting_time_display/setup/
Step 2: Final Setup (End User)
Connect Your Display
- Insert the microSD card into your Raspberry Pi (if not already inserted)
- Connect your Raspberry Pi to power using the USB cable
- Visit the setup page in Google Chrome or Edge
Configure Your Display
The setup wizard will guide you through:
- Connecting to your WiFi network
- Setting up your location for weather information
- Selecting your bus/tram stops
- Optional: Configuring flight tracking
After completing the wizard, your display will automatically update and show:
- Current weather conditions
- Next bus/tram arrival times
- Overhead flights (if configured)
Setting up the backend server
Important: The backend server needs to be set up for the display to work (otherwise the display will only display the weather and flights). See the backend server readme for more information. If the API keys are not configured, the service will not start. (If the backend server is set up on the Raspberry Pi, you can use the setup wizard to input the necessary API keys)