OLED displays on Navio

I want to add an OLED display to my Navio 2. I assume this is supported for Arduplane and the latest Stretch image I am using?

Any configuration I need to do other than set parameters in MP and get a compatible OLED display connected via an i2c hub.

Hello there!

There’s two makes of I2C OLED displays that are supported by ArduPilot: SH1106 and SSD1306.

Navio 2 doesn’t have this feature enabled during build but it can be fixed very easily.

  1. Here’s how you can cross-compile ArduPilot

  2. Add this line of code:

    _devices[2] = new Display(); 

after this line

  1. Recompile once more

  2. Copy the built binary to your Raspberry Pi

  3. Hook up your OLED

  4. Run i2cdetect -y 1 and make sure it’s detected on 0x3C

  5. Run ArduCopter, connect to a GCS and set an appropriate parameter.

I hope it’s not too much hassle. If it is, I’m sure we’ll work it out!

If you it works for you, feel free to submit a PR to ArduPilot!

Thanks. I am going to have to start to cross-compile at some point so I may as well start now.

1 Like

George can you help me here with a noob cross-compile question?

This surely is not your current Ardupilot Branch: GitHub - emlid/ardupilot: Emlid's port of ArduPilot for Navio/Navio+/Navio2.
(No commits for 2 years?) I assume this is an old branch you no longer maintain.

I assume the version I have now came from upstream: GitHub - ArduPilot/ardupilot: ArduPlane, ArduCopter, ArduRover, ArduSub source

How do I know what version of Arduplane I have installed currently? Can I rebuild when stable releases are announced? Is there more risk associated with this versus using a Pixhawk 1/2 as it may not have been tested on a Navio2.

I am sorry if these are very basic questions. I use Eclipse daily and code as such but mostly with Javascript APIs for cloud applications.

Marc

PS: I need some pointers here. I do not want to compile on my Raspberry Pi. Basically I gather this has to be done on Linux. Can I put an Ubuntu boot partition on an unused older Macbook. Clone Ardupilot in my Github repository, make the changes there, and then follow: https://docs.emlid.com/navio/common/ardupilot/building-from-sources/

Hello Marc!

Yeah, we switched to making releases from upstream. So, you can grab the code from the upstream as well.

ArduPlane sends version upon GCS connection. You can see it as a message once connected.

We test all stable releases on Navio, so you should be fine.

Well, you’re right that compiling it on Raspberry Pi might longer. But as a matter of fact for this time only, I would maybe try starting out on a Raspberry Pi. The build will take ~40min. You can calculate yourself, what’s easier for you: setup a Linux or cross-compile stuff. You can also use a Virtual Machine with a Linux

It’s easier to do cross-compiling stuff for Linux on Linux than on Windows. It can be done on Mac OS X but needs some hacking.

Thanks for the reply. At this point I have Ubuntu running on an older MacBook quite well (sadly it removed my rEFind boot setting on installation so I have to fix that). I like 3 minutes versus to 40.

I think with a lot of these questions you run into people that have not used Linux terminal environment much – it is incomprehensible unless you take the time to learn the syntax so I am doing basically Linux for Dummies now.

I have managed to do one cross compile successfully but I keep getting stuck at “waf configure --board=navio2”

It stops at checking for program ‘arm-linux-gnueabihf-ar’ and says ‘not found’.

Is this a problem with my 64 bit PATH setting? I have defined that for the terminal session as per instructions. I still am not sure why it worked once!

Anyhow if you can tell me if this a related to PATH then I will be pointed in the right direction.

1 Like

All figured out. My issues were Linux noobie related.

So @marcdornan I guess that you managed to get the Oled working ?

I’ve received a SH1106 that has a 0x78 default address, so I guess that is also safe to use on the NavIO2 @george.staroselskiy ?

Yes. Sorry about the late reply. Been on the road. I got my Oled working with Arduplane. And multiple wifi networks. Pretty much got everything working well on the bench quite quickly. My next project is to get the latest build of EZ Wifi Broadcast and an OSD working. I believe there is no technical reason why it will not work but it may take some effort to get a build that works.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.