Tuesday, April 06, 2021

Aeronear: an ambient device showing nearby aircraft

Here in Lisbon it's common to see aircraft because the main airport is in the city rather than being on the outskirts. And for a long time I used FlightRadar24 to answer the question "where did that aircraft come from or where is it going to?"

But I really like ambient devices such as my Totoro that gives the weather forecast or bus that shows when the next bus arrives. So, it was time to use a few things I had lying around and make a desktop ambient aircraft monitor that looks like this:

This uses a Raspberry Pi Model 3PiTFT 3.5" touch screen (which is kind of wasted because I don't use the touch functionality), a 24 LED NeoPixel ring28BYJ-48 stepper motor, and the ULN2003 driver, and a small model aircraft. It's all contained in an acrylic pot that I got from Muji.

The screen shows flight information and model aircraft and LED show the current direction the aircraft is flying (the track) and where to look for the aircraft. The first time the device is started the direction of north needs to be calibrated by holding down the blue button on the back until the LED points to north, releasing the blue button and then holding it down once again until the model aircraft points in the same direction. Once done the code keeps track of the calibrated position in planes_position.py so that unless the device is moved to a different location no further calibration is needed.

The code can be found here. It's written for Python 3 and you'll need to sign up for the ADSB Exchange API and get an API key and configure it in planes_config.py. While you're in that file also set your latitude and longitude.

The ADSB Exchange API gives you information but I augmented it with lists of aircraft types, airports and airlines to improve the output on the display. 

No comments:

Making an old USB printer support Apple AirPrint using a Raspberry Pi

There are longer tutorials on how to connect a USB printer to a Raspberry Pi and make it accessible via AirPrint but here's the minimal ...