Drivers for OLED displays and portable GUI

Discuss development of drivers for external hardware and components, such as LCD screens, sensors, motor drivers, etc.
Target audience: Users and developers of drivers.
Post Reply
User avatar
pythoncoder
Posts: 3060
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Drivers for OLED displays and portable GUI

Post by pythoncoder » Mon Sep 24, 2018 8:21 am

This nanogui project is intended to provide a simple GUI and graph plotting module portable to any display whose driver is subclassed from framebuf and which meets some other very simple requirements. The GUI is aimed at the display of sensor data. It has no provision for user input which must be handled in the application. To save RAM it uses 8 bit colour. Widgets are drawn using graphics primitives and hence may be scaled to very small displays.

If user input is required the official LCD160CR display with touch overlay should be used, with a GUI available here or for large 4.3" SSD1963 displays this one.

Display drivers are provided for Adafruit 1.5, 1.27 and 0.96 inch colour OLED displays. There is also the official SSD1306 driver for monochrome OLED displays. These may be used:
  • Alone (inheriting the framebuf graphics primitives).
  • With the CWriter class to display text in arbitrary fonts and colours.
  • Or with nanogui which builds on the CWriter class.
Some sample images. Small OLED displays are hard to photograph well. In practice they are very good with clear colours and extreme contrast. The following are samples from the test scripts running on a Pyboard with a 1.27" Adafruit display.

Image
The meter levels, LED text strings and colours change dynamically as the data changes.

Image
Analog clock. The widget is actually capable of displaying vectors of varying length, as straight line pointers or as arrows.

Image
The plot module displaying analog data being captured in (slow) real time.

The Nokia 5110 with this driver may also be used with the monochrome Writer class to display arbitrary fonts, but the resolution of these displays is probably inadequate for the GUI.
Peter Hinch

kevinkk525
Posts: 181
Joined: Sat Feb 03, 2018 7:02 pm

Re: Drivers for OLED displays and portable GUI

Post by kevinkk525 » Mon Sep 24, 2018 9:04 am

Sounds amazing!
When I have time to play with my SSD1306 I'll give it a try.

User avatar
pythoncoder
Posts: 3060
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Cheaper options

Post by pythoncoder » Mon Sep 24, 2018 9:14 am

I should add that Adafruit colour OLED displays are expensive. I usually pay their prices to support the work they do and because their quality, documentation and code is great. But cheap Chinese displays are available. They are inevitably something of an unknown quantity; the one I tried worked fine.
Peter Hinch

cmisztur
Posts: 1
Joined: Wed Sep 26, 2018 2:04 am

Re: Drivers for OLED displays and portable GUI

Post by cmisztur » Wed Sep 26, 2018 2:31 am

This looks great. Thank You!

Post Reply