- TTYM
- Posts
- TTYM Special Issue #2
TTYM Special Issue #2
Open-source Raspberry pi-based airport arrivals and departures board - re-issued.

Stuff that I find online as I go about my life as a maker, electronics engineer and overall proud nerd. You’re getting this because you registered on the supertechman.blogspot.com blog. I was a nerd before it was cool.
Raspberry pi-based airport arrivals and departures board - reissued! Beware: This is a long one.

Originally published in June 2022 on my old blog and referenced on Tom’s Hardware Guide in July 2022.
Introduction
During the pandemic I missed the easier days of travelling around the world with no limitations (other than budget...). Nothing on my imagination was more symbolic of those times than the arrivals and departures boards on airports and train stations, so I started to think it was a good idea to have my own board so I could look at it and imagine I was in the airport about to go somewhere even though I was really sick at home.
I went online and started looking for inspiration. The following image is an actual screenshot from when I was describing what I wanted on my projects folder (I start almost all projects with a list of ideas, some are written, some are images).

This image really embodies what I wanted to make: a screen that updates automatically showing arrivals and departures information from my local international airport.
So, I split the project into the following sections that needed to be tackled (the points marked "Great" are nice to have features that I would implement if I could find an easy enough way).:
Get arrivals and departures information from the airport.
Great): get real live data.
(Great): select from multiple airports instead of only a static one.
Display the information using a design similar to the one on the picture above.
(Great): show animation on every screen transition.
What hardware will I use?
How will it all look?
Getting data
The natural way to go about this was to use an API. I was certain that I could find an aviation related API but was it cheap/ free? And did it give me the information I was looking for? It turns out that there are quite a lot of options but not many are good options for my application. I won't bother you with all the pros and cons of all the options out there, but I will summarize what I found in general terms:
Most APIs are targeted at corporate users. The prices are too high and the features way too many for what I wanted.
A lot of them say "free" but the free tier is really not usable as it would mean you can get information updated about once daily which is not very exciting.
A lot don't even provide airport arrivals and departures data.
After all was done, I settled on two options: The OpenSky Network and airlabs.co. I really wanted to have gone for the OpenSky network with its community-based approach but the dealbreaker was that their arrivals and departures information was only updated once at the end of the day and that meant that the most updated data was from the day before. Not too impressive.
So Airlabs it is. If you're cheapo like me, the free API requests limit per month is 1000 but you can request double that by email (the procedure is explained on the automated email you receive upon registration). With 2000 requests per month, I have to control myself: in the worst-case scenario (which is a 31-day month) I can only make 64 requests per day or 2 requests per hour or 1 request every 30 minutes. Whatever software I will use needs to consider that.
Display design
Digging deep on the interwebs for display designs that I could use, I stumbled upon the HTML & SCSS Departure Board project by Tom Giddings. The building blocks of the design look like the this:

The design is open source under the MIT license and is highly customizable. What is also neat is that it provides transition animations made to look like a real flip display. I tried to add a gif to show you what I mean but it's giving way me too much work so at this point just imagine it and believe me that it really does that (or go to here HTML & SCSS Departure Board and see it in action). It's approved; I will use that.
Software
The choice of software was mostly due to the use of tools I'm comfortable with and that could very well take care of the task. I was leaning towards web applications with my choice of SCSS display described above so I went all in on web technologies: an apache webserver (as the main conductor of operations), running PHP (responsible for contacting the API and setting up the HTML output) and javascript to time the requests to the API and place the replies on to the UI dynamically. This is all coming together perfectly like when I put on a highly color-coordinated outfit: it's not only perfect, but also beautiful too.
On the client side I use a common web browser in kiosk (full screen) mode.
Hardware
I need a little horsepower to run all of what I described above. Remember that the same device will be both the server and the client. But there's no need for quantum computing. You know where this is going as the natural choice in this day and age is a raspberry pi. The integrated Wi-Fi on the pi decreases the number of cables needed and it is easy to connect an external display. It does what I need. On the screen front I had an old LCD that I pulled out of some victim years ago. It has a HDMI connection on it so connecting a short cable to the HMDI output of the pi was easy.

In the picture above you can see my fingers on the left, the HDMI input to the screen board on the top. The red and black wires on the right are for the display's power. I get the power from one of the USB ports on the pi. I thought I was pushing it in terms of required current to feed the screen but apparently it works well with the 500mA top current available from the USB port.
I used a pi 3 Model B. Studies indicate that images on articles make them more engaging so here's a picture of one of those pi 3 Model Bs for your reference (this is, of course, the fully analog variant). This is a test to see if you are still paying attention so far down on the article.

I also use a radio transceiver mouse and keyboard combination connected to another one of the USB ports so I can interact with the board (I still need the keyboard and mouse for a few things but see down below for the list of improvements I would like to make in order to get rid of them once and for all).
Looks
We have gotten to the point where we have that screen connected to that pi running all that software and we need to put everything inside some kind of good-looking enclosure. I'm a maker so I designed and 3D printed the enclosure. I'm not a gifted 3D designer and at this time the simplicity of tinkerCAD is a necessity. This is what I came up with after making measurements to make sure the screen, its driver board, the HDMI and power cables and the raspberry pi itself would all fit inside.

To spice things up a bit I designed the enclosure with absolutely no concerns about how I was going to secure the items inside. Knowing that they would physically fit was good enough for me. I figured I would skillfully secure them inside later in some manner. That manner was double sided tape inserts. It's not military grade but it works.

The pi seats on top of the display driver board and rests on some of those double sided tape things in such a way that the boards cannot touch. Everything is quite secure and when the lid is screwed in it applies a slight pressure on the USB ports of the pi further securing everything in. Almost as if I had planned for it.
This all now rests proudly in my living room for the amazement of friends and family. But somehow nobody cares as much as I do. It's actually quite entertaining to see all those planes coming and going. Soon I'll be seating on one of them going somewhere. I won't have to memorize my flight number I will know them all by heart.

Worthy of /r/Confusing Perspective, the screen Looks huge in this picture but really isn't. The display alternates between arrivals and departures every 45 seconds. Also includes a local time and an airport time for the viewer's convenience, no need to thank me.
All the stuff you need
For all the software running on the pi, go here. There are more comments throughout the code to guide you on making something like similar.
For the enclosure design, go here.
Final Comments & Conclusion
Good luck and may the force be with you.
That’s all folks!
Contribute
Help this newsletter grow and improve:
Share with friends and ask them to subscribe - I can’t wait until we’re more than the free tier of Beehiive allows for - then I’ll be asking for money 😯😯 (wait, maybe I’ll get some companies to pay for this…).
Send me interesting topics, tutorials, projects or anything that you think may be of interest to makers and tech enthusiasts like us - if it interests you, it’ll probably interest us (send your stuff here: [email protected]).
Please do contribute and send this out to your friends. Be available, don’t be like Deepseek.

Really, can anybody actually use this service?
Reply