I/O capable 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: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

I/O capable GUI

Post by pythoncoder » Wed Jun 23, 2021 8:00 am

micro-gui is an alternative to nano-gui. Both are portable between hosts, and both use the same display drivers providing portability to a range of displays.

While nano-gui is display-only, micro-gui has provision for user input via a set of from 2-5 pushbuttons. Alternatively a joystick-style navigation button may be used. With a TTGO T-Display an amazingly cheap WiFi capable I/O device can be constructed. The I/O capability comes at a cost in complexity and RAM usage: if you have no need for user input, nano-gui is preferred.

This image shows micro-gui running on a Pi Pico with a 320*240 ILI9341 display. The pushbuttons enable navigation between widgets. The Scale widget at top centre is one of several enabling the input of floating point values to high precision (0.05%). Widgets capable of input may programmatically be disabled (greyed-out), as may be seen on one of the pushbuttons.

Image

This is running with standard firmware and no use of frozen bytecode. It reports 72560 bytes free.

Please note that further development is planned namely extra demo scripts and improved drivers for some displays, so check for upgrades.
Peter Hinch
Index to my micropython libraries.

Mark's Bench
Posts: 9
Joined: Wed May 12, 2021 9:47 pm

Re: I/O capable GUI

Post by Mark's Bench » Thu Jun 24, 2021 3:43 am

This looks pretty amazing and I can already think of half a dozen things around the house where it'd be handy. Thank you!

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

ESP32 host

Post by pythoncoder » Fri Jul 02, 2021 3:53 pm

Here is another implementation. The host is a TTGO T-Display, which is an ESP32 with 240x135 display. I added a navigation joystick and an SIL pullup resistor. Total cost well under £20 ($20?) including the PCB.

Image
Peter Hinch
Index to my micropython libraries.

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

Re: I/O capable GUI

Post by Jackli » Fri Jul 16, 2021 7:11 am

Is this using the MCU for interface design, or does it have its own GUI design software?

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

Re: I/O capable GUI

Post by pythoncoder » Fri Jul 16, 2021 1:33 pm

It was developed explicitly for MicroPython. Please see the docs.
Peter Hinch
Index to my micropython libraries.

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

An update

Post by pythoncoder » Fri Jul 16, 2021 1:48 pm

This has had a significant update fixing bugs and improving the docs.

It now supports an alternative method of data entry which takes advantage of a quadrature encoder for adjustment of floating point values and traversing dropdowns and listboxes.

It now supports mult-level menus. The garish colors in this example are optional.

Image.

The Meter widget now supports data driven callbacks which run when the data value enters, leaves, or crosses regions. These are visible as colored bands on the control. It is easy to implement alarms or devices like thermostats which act as a switch having hysteresis. The image below shows a Meter in a demo with two regions. The red region at the top is configured as an alarm (which runs a callback on entry). The region in the middle has hysteresis. Regions can be changed at runtime.

Image

Apologies for my photography. These things look better in real life...
Peter Hinch
Index to my micropython libraries.

stanely
Posts: 55
Joined: Fri Jan 17, 2020 5:19 am
Location: Ohio, USA

Re: I/O capable GUI

Post by stanely » Tue Oct 26, 2021 1:19 pm

Great job, Peter! Your micro-GUI was recently credited in a nice instructable. https://www.instructables.com/Poor-Mans ... dium=email

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

Re: I/O capable GUI

Post by pythoncoder » Sun Oct 31, 2021 5:49 pm

That looks a nice project. Thanks for pointing it out.
Peter Hinch
Index to my micropython libraries.

Post Reply