High level GUI lib/framework

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
User avatar
mattyt
Posts: 215
Joined: Mon Jan 23, 2017 6:39 am

Re: High level GUI lib/framework

Post by mattyt » Sun Jan 27, 2019 5:01 am

I'd be very keen to test this on mainline! I have an application at work that could use it right now...

Currently I've created some basic widgets (label, multi-layer menu, progress bar) that are rendered on top of Loboris' display module. It works quite well but I'd much rather be on mainline. The problem is that all of the pure MicroPython ILI9341 drivers I've tried are lacking in some way; either generally slow, lack primitives (eg filled rectangles or circles) or have slow or limited font rendering. I can add all this but it's additional effort that Boris has already invested...

Anyway, I'll take a close look at the LittlevGL integration as time allows!

agonnen
Posts: 12
Joined: Sat Oct 13, 2018 7:52 pm

Re: High level GUI lib/framework

Post by agonnen » Sun Feb 24, 2019 12:14 pm

LittlevGL now officially supports Micropython!
More details: https://blog.littlevgl.com/2019-02-20/m ... n-bindings

This is an experimental feature, so we would appreciate your feedback.

You can try this example Micropython fork.
It has LittlevGL module enabled for the unix port and the ESP32 port.
The unix port uses SDL display and mouse driver, the ESP32 port uses ILI9341 driver.

User avatar
vitormhenrique
Posts: 17
Joined: Tue Jan 15, 2019 3:07 pm

Re: High level GUI lib/framework

Post by vitormhenrique » Sun Feb 24, 2019 7:14 pm

The current project that I'm working on also requires a GUI so I was doing it on c++ on an ESP32 with GUIslice.
I thought about doing some porting to micropython as it would simplify development, especially being able to update the firmware without compiling...

The project itself is a new controller for my robots, I don't like using standard rc controllers, and want to have a two screen setup, one with a video stream and another with a touchscreen and RX and TX information from the robot <-> controller.

this is a mock print that I did just to see if everything would fit and feel nice on the hand:


Image

I'm definitely going to test lvgl. It looks really good, but I need to see if it supports or it is easy to implement a capacitive touch handler.

User avatar
vitormhenrique
Posts: 17
Joined: Tue Jan 15, 2019 3:07 pm

Re: High level GUI lib/framework

Post by vitormhenrique » Sun Feb 24, 2019 7:41 pm

agonnen wrote:
Sun Feb 24, 2019 12:14 pm
LittlevGL now officially supports Micropython!
More details: https://blog.littlevgl.com/2019-02-20/m ... n-bindings

This is an experimental feature, so we would appreciate your feedback.

You can try this example Micropython fork.
It has LittlevGL module enabled for the unix port and the ESP32 port.
The unix port uses SDL display and mouse driver, the ESP32 port uses ILI9341 driver.
I just saw that it only supports resistive, it would be nice if if also had a generic touch driver, where from python you could just update a method .display_touched(x,y) for example. And the library would handle it. This way the implementation of the touch driver could be totally outside LittlevGL.

agonnen
Posts: 12
Joined: Sat Oct 13, 2018 7:52 pm

Re: High level GUI lib/framework

Post by agonnen » Sun Feb 24, 2019 7:55 pm

vitormhenrique wrote:
Sun Feb 24, 2019 7:41 pm
I just saw that it only supports resistive, it would be nice if if also had a generic touch driver, where from python you could just update a method .display_touched(x,y) for example. And the library would handle it. This way the implementation of the touch driver could be totally outside LittlevGL.
This is actually a good idea, and very simple to implement.
I'll add a generic touch driver.

But how do you go about display? I don't think a generic display is going to work very well, it needs high performance, DMA etc.
Do you use ILI9341?

User avatar
vitormhenrique
Posts: 17
Joined: Tue Jan 15, 2019 3:07 pm

Re: High level GUI lib/framework

Post by vitormhenrique » Mon Feb 25, 2019 12:23 am

agonnen wrote:
Sun Feb 24, 2019 7:55 pm
But how do you go about display? I don't think a generic display is going to work very well, it needs high performance, DMA etc.
Do you use ILI9341?
Video streaming for the controller is totally out of esp32, I'll embed a 5ghz video receiver for that, that is on the top display, the bottom one will display sensor information from the robot as well handle controller related settings etc, so no need to be ultra high performance.

agonnen
Posts: 12
Joined: Sat Oct 13, 2018 7:52 pm

Re: High level GUI lib/framework

Post by agonnen » Mon Feb 25, 2019 7:20 am

vitormhenrique wrote:
Mon Feb 25, 2019 12:23 am
Video streaming for the controller is totally out of esp32, I'll embed a 5ghz video receiver for that, that is on the top display, the bottom one will display sensor information from the robot as well handle controller related settings etc, so no need to be ultra high performance.
Still, to make the bottom one reasonably responsive, I think you would need the display driver in C. What controller do you use for your display?

User avatar
vitormhenrique
Posts: 17
Joined: Tue Jan 15, 2019 3:07 pm

Re: High level GUI lib/framework

Post by vitormhenrique » Mon Feb 25, 2019 2:48 pm

agonnen wrote:
Mon Feb 25, 2019 7:20 am
Still, to make the bottom one reasonably responsive, I think you would need the display driver in C. What controller do you use for your display?
Sorry, I missed part of you last message about the generic video driver, for the controller I'm using a ILI9341 capacitive display. but I have been testing a bigger RA8875 one.

I converted a circuit python library to micropython (check it here) and got really decent performance with a python drive. The driver has the ability to push a bunch of pixels t the screen so I guess it would be pretty responsive.

I have also been playing and creating a library for FT81X on micropython, those are pretty smart IC's.

halbritt
Posts: 2
Joined: Thu Dec 07, 2017 3:11 pm

Re: High level GUI lib/framework

Post by halbritt » Sat Mar 09, 2019 3:12 am

agonnen wrote:
Sun Feb 24, 2019 12:14 pm
LittlevGL now officially supports Micropython!
More details: https://blog.littlevgl.com/2019-02-20/m ... n-bindings

This is an experimental feature, so we would appreciate your feedback.

You can try this example Micropython fork.
It has LittlevGL module enabled for the unix port and the ESP32 port.
The unix port uses SDL display and mouse driver, the ESP32 port uses ILI9341 driver.
Which particular ILI9341 driver does this use? I've just started looking at this and want to test, but it's not immediately obvious to me.

halbritt
Posts: 2
Joined: Thu Dec 07, 2017 3:11 pm

Re: High level GUI lib/framework

Post by halbritt » Sun Mar 10, 2019 2:21 am

halbritt wrote:
Sat Mar 09, 2019 3:12 am
Which particular ILI9341 driver does this use? I've just started looking at this and want to test, but it's not immediately obvious to me.
I've done a little more reading and figured it out. The driver is included with the binding:

https://github.com/littlevgl/lv_binding ... iver/esp32

Funny, I tested with SDL and it just worked, didn't think to try it with ESP32 and the display.

Post Reply