jhonnymonclair / oled1090

Python script to display ADS-B data on Oled SSD1306
5 stars 2 forks source link
dump1090 python3

oled1090.py

Python script to display ADS-B data on Oled SSD1306

Oled1090.py is a Python script based on LUMA Oled Library, a nice piece of software that allows to write and draw on SSD1306 and other Oled display models. For more info, read https://luma-oled.readthedocs.io/en/latest/

SSD1306 is a 0,96 inch model, there are blue, white, yellow and yellow/blue versions available on the market, it comes in two resolutions, 128x32 or 128x64 pixels, and two different kinds of interface, I2C or SPI. On average the display uses about 20mA current, operating voltage from 3V to 5V. You can find it on Amazon or Ebay for few dollars.

One of them was laying in my drawer, a left over of a previous project, so I thought to have some fun with it and check if I could find some awesome purpose, that is how Oled1090 gets out.

Oled1090 reads Dump1090 data at intervals, if it finds an aircraft trespassing a preset proximity range then sends info on upper part of display for as long as the aircraft flights in the area. At same time, it keeps trace of the farthest received aircraft on the lower part of display.

Oled1090 Output

Tipically the program is installed on the same Raspberry running Dump1090 but nothing prevents you from install it on a different one, just take care to set the correct url in program according to that.

Note: Oled1090 processes only aicrafts transmitting identity and position (lat,lon), it relies just on the Aicraft.Json locally produced by Dump1090, there isn't any else involved database.

The following step-by-step guide has been written on the base of a Raspbian Buster Lite installation. Different version of Raspbian may or may not satisfy all required dependencies. If it fails, then something is missing. To correct it, "sudo apt-get install" whatever dependency.

Wiring

Enable I2C interface

sudo raspi-config

Detecting device memory address

(most of times the default address is 3C, so you can skip this step and eventually inspect later if doesn't work)

Install LUMA Oled Library

sudo apt-get update
sudo apt-get install python3-pil
sudo apt-get install python3-pip
sudo -H pip3 install --upgrade luma.oled

Install the program

configuring the program

example for a dump1090-mutability running on the same machine

 http://127.0.0.1/dump1090-mutability/data/aircraft.json

example for a dump1090-fa running on a machine on the same subnet

http://192.168.1.100/dump1090-fa/data/aircraft.json