LVGL desperation

Continuing the discussion from Real-world LVGL demo example?:

I am desperate with LVGL. I could not compile any LVGL code from examples on website and forums. I tried to start from HelloWorld but how to print text with this? Million commands which rely on hundreds of libraries. Even on website example relies on non existent functions, cannot be found on internet (lv_screen_active()).
How you guys manage with LVGL? Can you share any code i can compile?

As far I know, LGVL library doesn't work alone - it requires a low-level display library. Therefore, the examples of LVGL depends of the display library and won't compile without it.

I have no experience with LVGL, but this library has several examples:
https://github.com/moononournation/Arduino_GFX/tree/master/examples/LVGL

1 Like

I know, they are not compiling

Then tell us what you tried.

Or provide complete information. Display you want to use, with link, and processor/board you want to use, also with link if not a well-known one.
Then we can test-compile for you.
-jz-

Display is ESP32S3 Dev Module in Arduino IDE.
There are pack of examples and libraries from vendor which work ok.
I want just a sketch which will print HelloWorld in the middle of display so i'll understand how to work with. I tried this example from LVGL.io and no luck. I'd prefer VSCode and PlatformIO because it is faster compiling.

You didn't.

I installed LVGL from Library Manager, followed instruction from the example LvglHelloWorld.ino to configure it, and modified the example for one of my SPI TFTs:

/* More data bus class: https://github.com/moononournation/Arduino_GFX/wiki/Data-Bus-Class */
//Arduino_DataBus *bus = create_default_Arduino_DataBus();
Arduino_DataBus *bus = new Arduino_HWSPI(17, SS); // ESP32

/* More display class: https://github.com/moononournation/Arduino_GFX/wiki/Display-Class */
//Arduino_GFX *gfx = new Arduino_ILI9341(bus, DF_GFX_RST, 0 /* rotation */, false /* IPS */);
Arduino_GFX *gfx = new Arduino_ILI9486_18bit(bus, 16, 0, false);

and it compiles for ESP32 (Wemos LOLIN32 Lite).
Not yet tested if it runs. Maybe later.

Thank you for the link: https://www.aliexpress.com/item/1005004952726089.html
You have the same display that sits on my desk waiting for me to have time to play with.
I had hoped this display is supported by Arduino_GFX, and this seems to be true, see
.../examples/PDQgraphicstest/Arduino_GFX_dev_device.h line 10:

// #define ESP32_8048S070

I will check sometimes in the near future.

But you may have fun and luck in the meantime.
-jz-

1 Like

At this point i abandoned LVGL and doing my job with Arduino_GFX_Library
Looking forward to someone's experience with this platform

Selected board in Arduino IDE: ESP32S3 Dev Module, PSRAM: OPI PSRAM

https://github.com/moononournation/Arduino_GFX/tree/master/examples/PDQgraphicstest
with #define ESP32_8048S070 in Arduino_GFX_dev_device.h line 10:

https://github.com/moononournation/Arduino_GFX/blob/master/examples/LVGL/LvglHelloWorld/LvglHelloWorld.ino
with Arduino_GFX_dev_device.h copied to this example, and example modified to:

/* OPTION 1: Uncomment a dev device in Arduino_GFX_dev_device.h */
#include "Arduino_GFX_dev_device.h"

#ifndef GFX_DEV_DEVICE
/* More dev device declaration: https://github.com/moononournation/Arduino_GFX/wiki/Dev-Device-Declaration */
#if defined(DISPLAY_DEV_KIT)
Arduino_GFX *gfx = create_default_Arduino_GFX();
#else /* !defined(DISPLAY_DEV_KIT) */
/* More data bus class: https://github.com/moononournation/Arduino_GFX/wiki/Data-Bus-Class */
//Arduino_DataBus *bus = create_default_Arduino_DataBus();
//Arduino_DataBus *bus = new Arduino_HWSPI(0, SS); // ESP8266
//Arduino_DataBus *bus = new Arduino_HWSPI(17, SS); // ESP32

/* More display class: https://github.com/moononournation/Arduino_GFX/wiki/Display-Class */
//Arduino_GFX *gfx = new Arduino_ILI9341(bus, DF_GFX_RST, 0 /* rotation */, false /* IPS */);
//Arduino_GFX *gfx = new Arduino_ILI9486_18bit(bus, 2, 0, false); // ESP8266
//Arduino_GFX *gfx = new Arduino_ILI9486_18bit(bus, 16, 0, false); // ESP32

#endif /* !defined(DISPLAY_DEV_KIT) */
#endif /* !defined(GFX_DEV_DEVICE) */

and lv_conf.h configured as commented:

https://github.com/moononournation/Arduino_GFX/tree/master/examples/LVGL/LvglWidgets
with Arduino_GFX_dev_device.h copied to this example, and example modified, as above.
With touch.h configured/modified:

 #define TOUCH_MODULES_GT911
 #define TOUCH_MODULE_ADDR GT911_SLAVE_ADDRESS1
 #define TOUCH_SCL 20
 #define TOUCH_SDA 19
 #define TOUCH_RES 38
 #define TOUCH_INT -1

// Please fill below values from Arduino_GFX Example - TouchCalibration
bool touch_swap_xy = false;
int16_t touch_map_x1 = 0;
int16_t touch_map_x2 = 800;
int16_t touch_map_y1 = 0;
int16_t touch_map_y2 = 480;

and with lv_conf.h modified line 738:

/*Show some widget. It might be required to increase `LV_MEM_SIZE` */
#define LV_USE_DEMO_WIDGETS 1

LVGL works with Arduino_GFX on this display!
-jz-

Since then i managed to rule LVGL and this particular display. Even on VSCODE (which doesn't freeze and strangely "Offline" like ArduinoIDE).
Gonna post about findings if someone interested.

Hello, I saw your entire post, I am starting with ESP32, I want to compile something using LVGL, and no matter what I do, I always have many errors in the compilation, could you help me on how to start understanding and managing LVGL?
From already thank you very much

I just bought this display from Aliexpress. Spent hours and hours. First off I had to downgrade Espressif ESP32 board to pre 3.x.x, which is 2.0.17. I had it working at one time, but yet hit a block again. I'm to the point of tossing it into a box for when they have better support. I had used the PDQGraphics Test. Again it's not working. I would like something basic to at least get it going. But so far spent too many actual days messing with it.

Hi, @mmonteith

Please tell me which board you bought; is it the Display mentioned in the preceding post?
Why did you need to downgrade the ESP32 package?
What error messages did you get? Or what works and what doesn't?

Note that this topic is quite old and I didn't use Arduino_GFX almost since then.

I might do a test if you provide the complete code in a code window, "< code/ >" command icon.
Also put any error output in a code window, please.

In general, trying to help someone who is already frustrated, is rarely productive.
-jz-

Please tell me which board you bought; is it the Display mentioned in the preceding post?
Yes. That's the one.
Why did you need to downgrade the ESP32 package?

When I used the PDQgraphics test using the latest of the esp32 by Expressif I received a lot of errors.
What error messages did you get? Or what works and what doesn't?
Here is one: error: 'Arduino_ESP32RGBPanel' does not name a type; did you mean 'Arduino_ESP32S2PAR8Q'?

It's currently working this morning again, so don't have the error. But when I was searching for others that had the similar issues and also output from Copilot said to downgrade to pre-3.x.x versions. When I did, at least the errors went away.
Note that this topic is quite old and I didn't use Arduino_GFX almost since then.

I might do a test if you provide the complete code in a code window, "< code/ >" command icon.
Also put any error output in a code window, please.

The PDQgraphicstest is quite complex, with 4 include files. Since it's working I'm trying to get a snapshot of what library version, special Tools settings, etc.

In general, trying to help someone who is already frustrated, is rarely productive.

lol. I understand. You're no fun. Just kidding. With it currently running and hopefully grab all the right configuration I have something to work with. But pulling out the pieces will be interesting. I might also try some of the more simple examples to see if those can run too. If you have something more simple I'm open.

Wish there was a way on here to contact people directly.

Thanks for the answers. Good luck!

Here is an example how I did some tests: Arduino_GFX/examples/PDQgraphicstest at known_tests · ZinggJM/Arduino_GFX · GitHub
see specific: known_good.h
I copied this to any other example I tried.
But be aware that this branch is outdated.

You can use personal messages in the forum. But I don't like PMs for technical questions.

I just tried if I still can use Arduino_GFX with my display module ESP32 8048S070. I can't.
There is an issue Compilation error: 'Arduino_ESP32RGBPanel' does not name a type; did you mean 'Arduino_ESP32PAR8Q'? · Issue #530 · moononournation/Arduino_GFX · GitHub
which is declared closed, but isn't really solved, as it requires a downgrade of the ESP32 package for Arduino.
This may be an interim solution, but not usable for me, as I need to use current versions for my other tests.
-jz-

I have added an updated version of Arduino_RGB_Display and Arduino_ESP32RGBPanel with support for ESP32 3.0.5 to my fork.

I don't create a pull request yet, as this version is experimental (I am no expert for this ESP32S3 feature).
-jz-

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.