Touch GUI for the official Pyboard display

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
jgriessen
Posts: 191
Joined: Mon Sep 29, 2014 4:20 pm
Contact:

Re: Touch GUI for the official Pyboard display

Post by jgriessen » Sat Jul 01, 2017 7:22 pm

http://hinch.me.uk/gui2.mov
Nice functions in your display code!
I bet this could be adapted to a larger screen with Resolution : 240 * 320 like this fairly easily:
https://www.aliexpress.com/item/2-4-inc ... 60190.html
John Griessen blog.kitmatic.com

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

Re: Touch GUI for the official Pyboard display

Post by pythoncoder » Sun Jul 02, 2017 12:27 pm

I have two GUI drivers, one for the official display and another for a 4.3" 480x272, 24 Bit display https://github.com/peterhinch/micropython-tft-gui. The latter is built on top of low level drivers by Robert Hammelrath (@Roberthh).
Peter Hinch

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

Touch GUI for the official Pyboard display

Post by pythoncoder » Wed Oct 21, 2020 10:39 am

I have refactored this: it is now implemented as a Python package. This is a breaking change in that an application's import statements need to be changed. In other respects the API is unchanged. The new design has the following advantages:
  • GUI core is smaller, reducing RAM use: no need to cross-compile on a Pyboard 1.x or Pyboard D.
  • Unused widgets use no RAM.
  • Simplified installation and removal: one directory tree on the target.
  • New widgets can be added with zero impact on applications which don't use them.
There is also some guidance on hosting the GUI on an ESP32.

Thanks are due to Kevin Köck for alerting me to the merits of Python packages.
Peter Hinch

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

Re: Touch GUI for the official Pyboard display

Post by pythoncoder » Sun Nov 01, 2020 5:47 pm

This now supports two new widgets -see the README.

The first is a vector display which can show multiple vectors in "clock" or "compass" forms. Length, angle and color can change dynamically.
Image Image

The second is a "scale" display for float values. It enables variables with a wide dynamic range to be read with high precision. It emulates a display like that on some old radios where a long scale scrolls past a small window with a fixed pointer.
Image
The idea for this came from this forum post.

I plant to port these widgets to the nano-gui and the RA8875 GUI for large displays.
Peter Hinch

Post Reply