Drivers for various 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.
User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Drivers for OLED displays and portable GUI

Post by pythoncoder » Sun Jan 24, 2021 9:19 am

Now also supports a couple of monochrome ePaper displays:
Image
No, I haven't built a seismograph - this is just a mockup. And I know seismograph data doesn't actually look like this sinc function...
Peter Hinch
Index to my micropython libraries.

rahmed
Posts: 11
Joined: Sun Jan 03, 2021 10:15 am

Re: Drivers for OLED displays and portable GUI

Post by rahmed » Sun Jan 24, 2021 1:06 pm

pythoncoder wrote:
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.
Thank you for the update and I will give it a try

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

Display drivers and portable GUI

Post by pythoncoder » Sun May 02, 2021 12:34 pm

This now supports ST7789, including the TTGO T-Display. This is a low cost ESP32 with an integrated 135*240 color TFT. In my testing these work well and look to be very well made. The driver can be configured in landscape or portrait mode.

Other supported displays are these from Adafruit 1.3 inch and 1.54 inch. Both are 240*240 pixels.
Peter Hinch
Index to my micropython libraries.

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

TTGO T-Display image and mini review

Post by pythoncoder » Sun May 09, 2021 4:08 pm

Image of the TTGO T-Display. This must be the cheapest way to achieve a high quality display, MicroPython and WiFi. The board also has nice features like a JST connector for a LiPo cell complete with charger chip. It's also quite well documented with schematics bearing a little Chinese, but still easily understandable. The board seems well designed and manufactured. Others have noted that the display is at a slant relative to the PCB. While this is true, it's minimal.

The clock corrects itself periodically via NTP (although the RTC is very good). It also adjusts for UK DST. It runs with nearly 60K of free RAM so there's plenty of scope for doing more than just tell the time.
Image

Code is here.
Peter Hinch
Index to my micropython libraries.

Jackli
Posts: 80
Joined: Thu Apr 29, 2021 9:11 am

Re: Drivers for various displays and portable GUI

Post by Jackli » Thu May 20, 2021 8:19 am

I read this article too late and I am very sorry that the pictures are not visible.

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

Re: Drivers for various displays and portable GUI

Post by pythoncoder » Sun May 23, 2021 12:24 pm

I'm not clear which pictures are giving you trouble. Please provide a link and I'll investigate.
Peter Hinch
Index to my micropython libraries.

User avatar
mattyt
Posts: 410
Joined: Mon Jan 23, 2017 6:39 am

Re: Drivers for various displays and portable GUI

Post by mattyt » Thu May 27, 2021 2:45 am

All images seem visible to me Peter. More importantly, thank-you for continuing to update nano-gui!

(I also snuck in a thank-you into last night's May Melbourne MicroPython Meetup, slide 31!)

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

Re: Drivers for various displays and portable GUI

Post by pythoncoder » Thu May 27, 2021 4:06 am

Thank you for your support.

I have something new in the works - micro-gui. This is a framebuf based GUI which supports user input. Like nano-gui it is portable between platforms and display devices, using the same device drivers as nano-gui. User input is performed by a set of from 2 to 5 pushbuttons - or a joystick with left, right, up, down and press switches. It works in a comparable fashion to using the Tab and Enter keys on a PC keyboard to operate a GUI, and enables super-cheap I/O.

Like nano-gui it uses uasyncio but its use does not require knowledge of it.

It'll be about a couple of months before I have anything fit for release.
Peter Hinch
Index to my micropython libraries.

User avatar
mattyt
Posts: 410
Joined: Mon Jan 23, 2017 6:39 am

Re: Drivers for various displays and portable GUI

Post by mattyt » Thu May 27, 2021 5:08 am

I look forward to seeing what you've been cooking up! :)

Post Reply