Best choice of OLED library?

i'm working on a compact nano based device to connect to an on-board data-logger on a very small autonomous aircraft. I want it to display gps and sensor data, and by pushbutton action, dump contents of on-board SD to device mounted SD. The purpose of the display is to confirm sensor, auto-pilot, stabilization, GPS and sensor operation pre-flight.

I found that Ada and Spark's libraries consume too much progmem. But U8glib allows everything I need to fit.

OLED display is 128X64. I need only text.

Given above and that I will need to invest a fair amount of time to come up to speed on OLED code, is U8glib the best choice?

I just wrote my own code, it is not in a library. I made my own fonts. It is just numbers and letters. I'd have to extract it from my code but you are welcome to it, if you'd like. I used it mostly for debugging other code that I output to a 1602 but needed a separate place to print other stuff. Dwight

yes, I would like it if it can be extracted easily from your code. thank you for your response.


What controller?

If it's an SSD1306 then arguably the best library for text-only is found here:

It is small, supports multiple fonts (you can add more) and is well-written, documented and supported.

Thank you mr. boyton, this is exactly what i was looking for, and yes my little display is the small ssd1306. It’s funny how the things I expected to be easy turn out challenging.



Best of all, it works fine on the Nano and takes little room. Thanks again

Sounds like I don't have as much work to do. I'd have to look at mine again. It may not be a small as I though. I'd also used the display for a pong game and on the 2560. For ease of doing animation, I have an entire RAM buffer for every bit of the display. I don't recall if I did the text through that RAM buffer or not. I know it didn't start that way but I may have done that over time. That buffer is really large. I made it a little large for both displays as well ( 1106 and 1306 ). I just looked at my code, I made two buffers ( 1056 each ). Not too portable to a smaller machine. Dwight

Thanks for the offer in any case Dwight. :)

Hey Dwight, I'd like to see your oled code! I've looked at the adafruit code, and while I am VERY pleased with the speed, the memory hit is a bit much. If you think your code can be rewritten using a smaller buffer, it could be VERY useful. Please post it, ot perhaps a link?

ps, I'm also gonna take a look at the code pointed to by jboyton above.


The Adafruit library is a graphics library. If you need to reduce RAM usage you can use the u8glib graphics library instead.

The library I posted a link to (SSD1306Ascii) is text-only; no graphics. It has no buffer and total RAM requirements are quite small, less than 100 bytes.

Thanks jboyton. I installed the SDA1306Ascii library and it works well. I especially like all the font choices! One of my applications uses graphics, but the other one (a gps) is strictly text. It'll take a bit of work, but I'm gonna convert over to the new library for that device, I think it will be a big improvement cause it'll let me put more features in. :D