A Raspberry Pi flight tracker that displays overhead aircraft information using FlightRadar24 data on an MHS 3.5" SPI display. When no flights are nearby, it shows the current time, date, and weather.
- Real-time flight tracking via FlightRadar24 public API
- Weather display with multi-page cycling (Open-Meteo, no API key required)
- Touch input to cycle between multiple nearby flights
- Watchlist highlighting for specific aircraft (Red Arrows, BBMF, celebrities, etc.)
- HDMI output mirroring with automatic resolution detection
- Loading screen with IP address display
- Configurable via YAML
- Raspberry Pi 1 Model B (or newer)
- MHS 3.5" SPI Display (480x320, ILI9486 controller)
- Internet connection (for flight and weather data)
The MHS 3.5" display connects via the GPIO header:
| Display Pin | Pi GPIO | Function |
|---|---|---|
| VCC | 3.3V (Pin 1) | Power |
| GND | GND (Pin 6) | Ground |
| CS | CE0 (Pin 24) | SPI Chip Select |
| RST | GPIO 25 (Pin 22) | Reset |
| DC | GPIO 24 (Pin 18) | Data/Command |
| SDI/MOSI | MOSI (Pin 19) | SPI Data |
| SCK | SCLK (Pin 23) | SPI Clock |
| LED | 3.3V | Backlight (always on) |
-
Clone or copy this project to your Pi:
cd ~ git clone https://github.com/videojedi/Flight-Tracker-Pi.git cd Flight-Tracker-Pi
-
Run the setup script:
chmod +x setup.sh ./setup.sh
-
Edit the configuration:
nano config.yaml
-
Reboot if SPI was just enabled:
sudo reboot
Edit config.yaml to set your location and preferences:
# Your location
location:
latitude: 51.5074 # Your latitude
longitude: -0.1278 # Your longitude
name: "London" # Display name
# Search radius for flights (km)
flight_radius_km: 50
# Flight update interval (seconds)
flight_update_interval_seconds: 15
# Display settings
display:
width: 480
height: 320
mirror_hdmi: true # Mirror display to HDMI output
# Watchlist - aircraft registrations to highlight
watchlist:
G-ABCD: "Friend's Plane"
XX202: "Red 1"The watchlist highlights specific aircraft with a magenta colour scheme when detected. Includes support for:
- Custom aircraft names/descriptions
- Case-insensitive registration matching
- Pre-configured entries for Red Arrows and BBMF aircraft
Test the display with sample data:
source venv/bin/activate
python main.py --testsource venv/bin/activate
python main.pysudo systemctl enable flight-tracker
sudo systemctl start flight-trackerView logs:
journalctl -u flight-tracker -fShown during startup:
- Flight Tracker Pi logo with radar rings
- Status messages (Initializing, Fetching weather, etc.)
- IP address in bottom right corner
When aircraft are detected nearby:
- Flight number and airline
- Route (origin → destination) with city names
- Altitude, speed, and heading
- Distance from your location
- Climbing/descending indicator
- Aircraft type and registration
- Watchlist highlighting (magenta theme with custom name banner)
- Tap screen to cycle between multiple flights
When no flights are nearby (auto-cycles through 3 pages):
- Page 1: Time, date, temperature, feels like, wind, humidity
- Page 2: Temperature, high/low, precipitation, pressure
- Page 3: Temperature, wind gusts, sunrise/sunset times
- Location name and page indicator
- FlightRadar24 - Real-time flight tracking data (public feed, no API key required)
- Open-Meteo - Weather data (free, no API key required)
- Ensure SPI is enabled:
sudo raspi-config→ Interface Options → SPI - Check connections match the pinout table
- Try running with
--testflag
- Verify your coordinates in config.yaml
- Increase the
flight_radius_kmvalue - Check internet connectivity
- Open-Meteo is free but rate-limited; data updates every 15 minutes by default
- Check
mirror_hdmi: truein config.yaml - Ensure HDMI is connected before starting the application
- The display auto-detects resolution and bit depth
flight-tracker-pi/
├── main.py # Application entry point
├── config.yaml # Configuration file
├── requirements.txt # Python dependencies
├── setup.sh # Installation script
└── src/
├── display.py # MHS 3.5" display driver + HDMI mirroring
├── flight_tracker.py# FlightRadar24 API client
├── weather.py # Open-Meteo weather client
├── airports.py # IATA airport code lookup
├── touch.py # Touch input handler
└── ui.py # UI screens (Loading, Flight, Idle)
The Raspberry Pi 1 Model B has limited resources. The application is optimised for:
- Minimal CPU usage (1s refresh rate)
- Efficient SPI transfers at 125MHz
- Cached weather data (15-minute intervals)
- Batched flight API requests (15-second intervals)
- NumPy-accelerated framebuffer conversion (when available)
MIT License - See LICENSE file