FlightAware Discussions

Outputting Flight Data onto an OLED/LCD

Hi Everyone,

I’ve recently finished setting up my ADSB Receiver on a Pi 2 and have an LCD i2c of which I can use in order to display flight information. I have attempted using this GitHub repository for it: https://github.com/mattdy/flightpi and I just keep getting errors despite updating the API links (for some reason some I/O error which I don’t quite understand?). If anyone has any other repositories that I could use in order to output some flight data, that would be great. I can easily buy an OLED if necessary.

Thank you!

Posting the errors here would be helpful

Whoops, thought I posted it. Here’s the pastebin: [https://pastebin.com/zpvMZDAY]

Note: CloudFlare detects this as a Phishing Site, when it is just a pastebin where I posted the error.

I am not a Python expert, but maybe the script was written for an older version?
Or there are libraries missing

I’ve been using Python 2.7 in order for it to work, Python 3 doesn’t seem to support the module it requires. I do think I have all the libraries installed however.

I haven’t attempted OLED yet myself, but from notes I put together sometime back:

#python2
sudo apt-get update
sudo apt-get install python-pip
sudo apt-get install python-pil
sudo apt-get install python-numpy
sudo pip install RPi.GPIO
sudo pip install spidev

Maybe missing something in there. I did not study your error logs, so excuse if you’ve already double checked these.

Sorry, I’m using LCD at the moment! I’m also looking for an OLED Alternative if we can’t get this to function.

Full Error Log Image:

Raspberry Pi 2B
Using Jumper Cables
(Have tried other LCD Scripts which seem to work.)

Ohh I’m terrible, sorry. You clearly stated LCD, i2C. I got hung up on the OLED thing mainly because its something was studying earlier today of all things.

Something’s telling me that the GPIO isn’t initiated correctly. What specific unit are you using and what chipset is it based on? What comes up when you query the I2C bus? “i2cdetect -y 1” I’m grasping at straws as I’ve only worked with LED on Arduino - bit different here.

Interesting concept though with setting up certain parms to spit out on an LCD or OLED device here so I’m all eyes if someone smart has already gone through the pain of setting this up. (cough- FA’s “jailed” flight-feeders!).

There are a few here who know exactly how this works…

If going the LED route, I suspect 3.2 inch plus…why not just do package install on top of the desktop environment and show it though :localhost on the browser?

Hi,

It i2cdetect is detecting 0x27 as my i2c address and the chipset on the LCD is PCF8574T

After some quick research, that project is meant for not only the LCD, but also an Arduino to run an LCD setup according to the Fritzing example. It looks like that project will take some manipulation to work stand-alone for what think you’re trying to do.

First off it appears the I2C address is hardcoded in the LCDThread.py:

class LcdThread(threading.Thread):
    def __init__(self, address=0x20, width=20):

I would expect it to also crap out when the ArduinoThread is called unless you have one piggy-backed and/or the calls rem’d out.

And SBSThread will more than likely crap out if dump1090-fa isn’t running and spitting data on port 30003.

I’m not a Python expert, maybe someone else can jump in if they look at the project pages…

Thanks, I’ll take a look when I’m home. The guy said it could run without an Arduino should I comment out the Arduino code.

Alright, so I’ve changed the address and the ‘Mercury’ Port to 30005 and this is the result at the moment

We don’t have any i2c errors now which is at least something!

I’ve added my adjusted code to Github here: https://github.com/GalaxyTheoryz/flightpi

Issue resolved!

Was some problem with the web address / port, however it’s working like a charm now.

1 Like

Well done! Is the working version sync’d with your Github?

Looks like long story short - comment the arduino thread iterations out and correct the I2c address for your particular device. Is it still working with Beast, or did you end up changing the port back?

Cool setup.

It is the working version in my GitHub repository. Basically the issue was the IP Address, so where it says “Mercury” in FlightPi.py, it needs to be replaced with your local IP of the raspberry pi, and then the port stays the same, which is 30003. I’ve updated the API Links in my repository if anyone wants to have a go, plus publishing instructions later.

1 Like

How to Build Links: https://github.com/GalaxyTheoryz/flightpi/blob/master/README.md

Fully functioning as of 03/08/20