How to setup the lvgl library for Esp32-s3-WROOM-1 with TFT display 800*480

I have esp32-s3-wroom-1 board with 800*480 TFT LCD.
I have been trying to upload the examples code from lvgl library but it didn’t work I’m getting this error

C:\Users\acer\OneDrive - Assumption University\Desktop\IoT_DEV\4.3inch_ESP32-4827S043\4.3inch_ESP32-4827S043\1-Demo\Demo_Arduino\3_3-4_TFT-LVGL-Widgets\LvglWidgets\LvglWidgets.ino:48:24: error: conflicting declaration ‘Arduino_ESP32RGBPanel* bus’
Arduino_ESP32RGBPanel bus = new Arduino_ESP32RGBPanel(
^~~
C:\Users\acer\OneDrive - Assumption University\Desktop\IoT_DEV\4.3inch_ESP32-4827S043\4.3inch_ESP32-4827S043\1-Demo\Demo_Arduino\3_3-4_TFT-LVGL-Widgets\LvglWidgets\LvglWidgets.ino:43:18: note: previous declaration as 'Arduino_DataBus
bus’
Arduino_DataBus bus = create_default_Arduino_DataBus();
^~~
C:\Users\acer\OneDrive - Assumption University\Desktop\IoT_DEV\4.3inch_ESP32-4827S043\4.3inch_ESP32-4827S043\1-Demo\Demo_Arduino\3_3-4_TFT-LVGL-Widgets\LvglWidgets\LvglWidgets.ino:53:64: error: no matching function for call to ‘Arduino_ESP32RGBPanel::Arduino_ESP32RGBPanel(int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int)’
8 /
B0 /, 3 / B1 /, 46 / B2 /, 9 / B3 /, 1 / B4 */);
^
In file included from c:\Users\acer\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/Arduino_GFX_Library.h:17,
from C:\Users\acer\OneDrive - Assumption University\Desktop\IoT_DEV\4.3inch_ESP32-4827S043\4.3inch_ESP32-4827S043\1-Demo\Demo_Arduino\3_3-4_TFT-LVGL-Widgets\LvglWidgets\LvglWidgets.ino:33:
c:\Users\acer\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/databus/Arduino_ESP32RGBPanel.h:59:3: note: candidate: ‘Arduino_ESP32RGBPanel::Arduino_ESP32RGBPanel(int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, int32_t, bool, uint16_t, uint16_t)’
Arduino_ESP32RGBPanel(
^~~~~~~~~~~~~~~~~~~~~
c:\Users\acer\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/databus/Arduino_ESP32RGBPanel.h:59:3: note: candidate expects 33 arguments, 23 provided
c:\Users\acer\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/databus/Arduino_ESP32RGBPanel.h:56:7: note: candidate: ‘constexpr Arduino_ESP32RGBPanel::Arduino_ESP32RGBPanel(const Arduino_ESP32RGBPanel&)’
class Arduino_ESP32RGBPanel
^~~~~~~~~~~~~~~~~~~~~
c:\Users\acer\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/databus/Arduino_ESP32RGBPanel.h:56:7: note: candidate expects 1 argument, 23 provided
c:\Users\acer\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/databus/Arduino_ESP32RGBPanel.h:56:7: note: candidate: ‘constexpr Arduino_ESP32RGBPanel::Arduino_ESP32RGBPanel(Arduino_ESP32RGBPanel&&)’
c:\Users\acer\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/databus/Arduino_ESP32RGBPanel.h:56:7: note: candidate expects 1 argument, 23 provided
C:\Users\acer\OneDrive - Assumption University\Desktop\IoT_DEV\4.3inch_ESP32-4827S043\4.3inch_ESP32-4827S043\1-Demo\Demo_Arduino\3_3-4_TFT-LVGL-Widgets\LvglWidgets\LvglWidgets.ino:66:1: error: ‘Arduino_RPi_DPI_RGBPanel’ does not name a type; did you mean ‘Arduino_ESP32RGBPanel’?
Arduino_RPi_DPI_RGBPanel *gfx = new Arduino_RPi_DPI_RGBPanel(
^~~~~~~~~~~~~~~~~~~~~~~~
Arduino_ESP32RGBPanel

exit status 1

Compilation error: conflicting declaration ‘Arduino_ESP32RGBPanel* bus’

I would like to upload a simple code from lvgl and setup the library in other fo it to work with my board ?


I have alr crossed that problem heres a solution

1 Like

sorry @Yuri_Alves_Bordin but I don’t understand how do you fix that problem im facing the same issue

Hello, maybe you can help this zip file. http://pan.jczn1688.com/directlink/1/ESP32%20module/4.3inch_ESP32-4827S043.zip

This zip file has demo and, some instructions in “User manual” folder.

1 Like

hi there, yeah im using that folder to try some demos but I got the exact same error about ‘no matching function for call to’ as Yuri that’s why I ask about how to fix it, greetings

Firstly, let me clarify that the display used is a Parallel display with a 565 RGB 24-bit configuration.

I have provided a link containing the codes I used to ensure the display functions flawlessly, eliminating any compilation errors. When encountering those errors you have, I faced difficulties resolving them, prompting me to develop my own code by referencing libraries and information gathered from their demos. and that code is provided at my github

(my code is using the latest version of the libs)

Hi @Eldad ,

Looking at the error I think you need to use an older version of the GFX Library for Arduino, try installing V1.3.0.

cc @M1crobit0

Kind Regards,

Pete

3 Likes

Hi @M1crobit0 ,

I’m sorry but you will need to edit your post please to escape the code sequence as it is unreadable at the moment. It should work if you do this:

```

Your Code

```

Check the preview to see if it worked…

Kind Regards,

Pete

1 Like

Hi @pete-pjb sorry here’s the correction, I my case the code im trying to flash its just a tft hello world:

#include <Arduino_GFX_Library.h>
#include <Arduino_GFX.h>
#include <lvgl.h>

#define GFX_BL DF_GFX_BL // default backlight pin, you may replace DF_GFX_BL to actual backlight pin
#define TFT_BL 2
/ More dev device declaration: Dev Device Declaration · moononournation/Arduino_GFX Wiki · GitHub /
#if defined(DISPLAY_DEV_KIT)
*Arduino_GFX gfx = create_default_Arduino_GFX();
#else / !defined(DISPLAY_DEV_KIT) /

/ More data bus class: Data Bus Class · moononournation/Arduino_GFX Wiki · GitHub 1 /
*//Arduino_DataBus bus = create_default_Arduino_DataBus();

/ More display class: Display Class · moononournation/Arduino_GFX Wiki · GitHub 1 /
*//Arduino_GFX gfx = new Arduino_ILI9341(bus, DF_GFX_RST, 0 / rotation /, false / IPS /);

*Arduino_ESP32RGBPanel bus = new Arduino_ESP32RGBPanel(

GFX_NOT_DEFINED /* CS /, GFX_NOT_DEFINED / SCK /, GFX_NOT_DEFINED / SDA /,

41 /* DE /, 40 / VSYNC /, 39 / HSYNC /, 42 / PCLK /,

14 /* R0 /, 21 / R1 /, 47 / R2 /, 48 / R3 /, 45 / R4 /,

9 /* G0 /, 46 / G1 /, 3 / G2 /, 8 / G3 /, 16 / G4 /, 1 / G5 /,

15 /* B0 /, 7 / B1 /, 6 / B2 /, 5 / B3 /, 4 / B4 /
);
// option 1:
// 7寸 50PIN 800480*
*Arduino_RPi_DPI_RGBPanel gfx = new Arduino_RPi_DPI_RGBPanel(

bus,*
// 800 / width /, 0 / hsync_polarity /, 8/ hsync_front_porch /, 2 / hsync_pulse_width /, 43/ hsync_back_porch /,
// 480 / height /, 0 / vsync_polarity /, 8 / vsync_front_porch /, 2/ vsync_pulse_width /, 12 / vsync_back_porch /,
// 1 / pclk_active_neg /, 16000000 / prefer_speed /, true / auto_flush /);

800 /* width /, 0 / hsync_polarity /, 210 / hsync_front_porch /, 30 / hsync_pulse_width /, 16 / hsync_back_porch /,

480 /* height /, 0 / vsync_polarity /, 22 / vsync_front_porch /, 13 / vsync_pulse_width /, 10 / vsync_back_porch /,

1 /* pclk_active_neg /, 16000000 / prefer_speed /, true / auto_flush /);

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

End of Arduino_GFX setting*
*****************************************************************************/
void setup(void)
{

gfx->begin();*
gfx->fillScreen(BLACK);*
#ifdef TFT_BL

pinMode(TFT_BL, OUTPUT);*

digitalWrite(TFT_BL, HIGH);*
#endif

gfx->setCursor(10, 10);*

gfx->setTextColor(RED);*

gfx->println(“Hello World!”);*

delay(2000); // 5 seconds*
}

void loop()
{

gfx->setCursor(random(gfx->width()), random(gfx->height()));*

gfx->setTextColor(random(0xffff), random(0xffff));*

gfx->setTextSize(random(6) /* x scale /, random(6) / y scale /, random(2) / pixel_margin /);

gfx->println(“Hello World!”);*

delay(1000); // 1 second*
}

but im getting when I check the serial monitor its obviously isn’t working the code, no output in the screen here’s the error code that is referring to a .cpp archive inside the library :

lcd_panel.rgb: esp_lcd_new_rgb_panel(151): no mem for frame buffer
ESP_ERROR_CHECK failed: esp_err_t 0x101 (ESP_ERR_NO_MEM) at 0x4037a84c
file: “/Users/luisdiaz/Documents/Arduino/libraries/Arduino_GFX-master/src/databus/Arduino_ESP32RGBPanel.cpp” line 252
func: uint16_t* Arduino_ESP32RGBPanel::getFrameBuffer(uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, int32_t)
expression: esp_lcd_new_rgb_panel(_panel_config, &_panel_handle)

abort() was called at PC 0x4037a84f on core 1

Just to clarify I have to use the 1.2.8 version of the library because if I use the latest version it doesn’t even compiles getting a bunch of errors so I was told to use that older version to make it work. greetings

@Eldad

Greetings. I have the 480 x 272 TFT with capacitive touch screen version of this board. AKA ESP32-4827S043.

It’s been a bit of a bear to get the lvgl demo’s running but just managed to do so, except, the touch screen isn’t yet working. One thing at a time.

Attached is a zip file containing the code and config file used.

Note, you will have to replace the Arduino_ESP32RGBPanel* rgbpanel = new Arduino_ESP32RGBPanel( configuration with the correct one for your 800 *480 panel.

Also, copying the demo and examples folder as given here and following the README.md file here was needed.
Note that I did have to explicitly include the path to lv_demos.h as seen in the sketch.

File touch.h will also have to be edited to select the correct driver for your touch panel (and possibly install the needed library).

My environment:
DUT: Sunton ESP32-4827S043C (capacitive touch screen, ESP32-S3-N16R8).

Arduino IDE: Version: 2.1.1, Date: 2023-06-30T16:00:43.829Z, CLI Version: 0.32.3

Host: macOS v13.5 (22G74) Ventura

arduino-esp32 Core: v2.0.11

lvgl at version 8.3.7
GFX Library for Arduino at version 1.3.7
SPI at version 2.0.0
Wire at version 2.0.0
TAMC_GT911 at version 1.0.2

From sketch upload:
esptool.py v4.5.1
Chip is ESP32-S3 (revision v0.1)
Features: WiFi, BLE
Crystal is 40MHz

Arduino IDE Settings:
Board: “ESP323 Dev Module”
USB CDC On Boot: “Disabled”
CPU Frequency: “240MHz (WiFi)”
Core Debug Level: “None”
USB DFU On Boot: “Disabled”
Erase All Flash Before Sketch Upload: “Disabled”
Events Run On: “Core 1”
Flash Mode: “QI0 80MHz”
Flash Size: “16MB (128Mb)”
JTAG Adapter: “Disabled”
Arduino Runs On: “Core 1”
USB Firmware MSC On Boot: “Disabled”
Partition Scheme: “8M with spiffs (3MB APP/1.5MB SPIFFS)”
PSRAM: “OPI PSRAM”
Upload Mode: “UARTO / Hardware CDC”
Upload Speed: “921600”
USB Mode: “Hardware CDC and JAG”

Hope this helps.

If anyone knows how to modify the sketch to get the touch screen working, I’d appreciate the info! On this version of the board it uses the GT911 driver.

LVGL_Arduino480272.zip (12.3 KB)

1 Like

i have made some updates to this link:

//github.com/YuriAlvesBordin/ESP32/tree/main/PlatformIO

now theres a example project too you can use it as reference to build yours since its for the same board

1 Like

Hello all. Attaching a zip file containing a fully functional version of the LVGL_Arduino.ino demo sketch and associated lv_conf.h file!

Target is the Sunton ESP32-4827S043C (480 * 272 TFT LED display with capacitive touch) but comments in the sketch are provided to (probably) make it run on the ESP32-8048S043C (pretty much the same board with an 800 * 480 IPS LED panel).

If it would be useful, I could also upload the binary file.

Fire back with any questions!

LVGL_Arduino480272.zip (13.2 KB)

2 Likes

Thankyou

Thankyou for your help

thanks for your help, it was helpful