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.
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.
I/O capable GUI
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
I/O capable GUI
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
-
- Posts: 9
- Joined: Wed May 12, 2021 9:47 pm
Re: I/O capable GUI
This looks pretty amazing and I can already think of half a dozen things around the house where it'd be handy. Thank you!
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
ESP32 host
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.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: I/O capable GUI
Is this using the MCU for interface design, or does it have its own GUI design software?
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: I/O capable GUI
It was developed explicitly for MicroPython. Please see the docs.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
An update
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.
.
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.
Apologies for my photography. These things look better in real life...
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.
.
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.
Apologies for my photography. These things look better in real life...
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: I/O capable GUI
Great job, Peter! Your micro-GUI was recently credited in a nice instructable. https://www.instructables.com/Poor-Mans ... dium=email
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: I/O capable GUI
That looks a nice project. Thanks for pointing it out.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.