Giter VIP home page Giter VIP logo

rzeldent / esp32-smartdisplay Goto Github PK

View Code? Open in Web Editor NEW
336.0 20.0 63.0 49.59 MB

PlatformIO library LVGL Drivers for Sunton Smart display boards (CYD Cheap Yellow Display). This library supports these boards without any effort. ESP32-2432S024N/R/C, ESP32-2432S028R/C, ESP32-3248S035R/C, ESP32_8048S070N/C

Home Page: https://github.com/rzeldent/platformio-espressif32-sunton

C 99.99% C++ 0.01%
esp32 ili9341 lvgl st7796 esp32-3248s035c esp32-3248s035r xpt2046 esp32-2432s028 esp32-2432s028r esp32-3248s035

esp32-smartdisplay's Introduction

You ❤️ it?
Please ⭐ it!

esp32-smartdisplay's People

Contributors

ardnew avatar busbuyukefe avatar marcojk avatar rzeldent avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp32-smartdisplay's Issues

Demo just flashing the LED

Hello,

am I missing smth or is the demo just flashing the LED on the display board? I expected something fancy on the display ;-)
Took me a while to figure out that this one doesn't work with the arduino IDE sigh so finally I got it into platformIO
but once I uploaded it it is doing nothing but the blinking LED.

using the non touch version: -D ESP32_2432S024N

regards

doesn't work with ESP32-2432S028R

Hi, I've tried the demo code and a regular one (generated by the SquareLine Studion) however the display never gets it's backlight on
and there's a loop of the errors "indev_pointer_proc: X is 240 which is greater than hor. res (in lv_indev.c line #362)" in both the example and the regular one.
in the demo code, the RGB LED on the back changes its colors.
Please let me know, if I'm missing something

Compile error

Hi,

I am new to the display, was trying to compile your library, but it fails with the following error. Any idea?

.pio/build/esp32dev/src/main.cpp.o:(.literal._Z10mainscreenv+0x8): undefined reference to `lv_font_montserrat_22'
collect2: error: ld returned 1 exit status
*** [.pio/build/esp32dev/firmware.elf] Error 1

WiFi STA

HI,
I have an ESDP-2432S028R and am running the lvgl_pushbutton example. The ESP never connects to my WiFi, and I cannot find an AP. Is there a 'secrets' file I should be using?

Regards
Dave

ESP32-8048S043 with Capacitive Touch

Hi,

Great job on putting this together, so I was very hopeful when I started with this library. However, I have the 4.3inch version of the 800x480 display instead with a capacitive touch screen. There seems to be no board definition for this one, so I selected the ESP32_8048S070C, but the screen stays black. Is it possible to add this board definition or alternatively, any indications of what I should change in the include files to get this board to work ?

Thanks, Patrick

How to start, please?

Hi.
Im new with this device and after lot of hours rounding around, im unable to understand how to make run this. Can you, please, give me the first steps about how to setup the folders and how to start the project? thanks very much in advance

ESP32_8048S070C 'ESP_LCD_GC9A01_VER_MAJOR' undeclared

I have an ESP32_8048S070C
also info
setup board from the readme

[env:esp32-s3-devkitc-1]
board = esp32-s3-devkitc-1
board_build.arduino.memory_type = qio_opi
board_upload.flash_size = 16MB
board_build.arduino.partitions = app3M_fat9M_16MB.csv

lib_deps = 
    https://github.com/rzeldent/esp32-smartdisplay.git#feature/esp32s3	

build_flags =
    -Ofast
    -Wall
    -D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE
    -D LV_CONF_PATH=${PROJECT_INCLUDE_DIR}/lv_conf_new.h
    -D ESP_LCD_ST7796_VER_MAJOR=1
    -D ESP_LCD_ST7796_VER_MINOR=2
    -D ESP_LCD_ST7796_VER_PATCH=0
    -D ESP_LCD_ILI9341_VER_MAJOR=1
    -D ESP_LCD_ILI9341_VER_MINOR=2
    -D ESP_LCD_ILI9341_VER_PATCH=0
    -D CONFIG_ESP_LCD_TOUCH_MAX_POINTS=1
    -D CONFIG_XPT2046_CONVERT_ADC_TO_COORDS
    -D CONFIG_XPT2046_Z_THRESHOLD=600
    -D ESP32_8048S070C
    -D BOARD_HAS_PSRAM     

when I try to compile a project, I get the following errors

.pio/libdeps/esp32-s3-devkitc-1/esp32_smartdisplay/src/esp_lcd_gc9a01.c:128:66: error: 'ESP_LCD_GC9A01_VER_MAJOR' undeclared (first use in this function); did you mean 'ESP_LCD_ILI9341_VER_MAJOR'?
.pio/libdeps/esp32-s3-devkitc-1/esp32_smartdisplay/src/esp_lcd_gc9a01.c:128:92: error: 'ESP_LCD_GC9A01_VER_MINOR' undeclared (first use in this function); did you mean 'ESP_LCD_ILI9341_VER_MINOR'?
.pio/libdeps/esp32-s3-devkitc-1/esp32_smartdisplay/src/esp_lcd_gc9a01.c:129:14: error: 'ESP_LCD_GC9A01_VER_PATCH' undeclared (first use in this function); did you mean 'ESP_LCD_ILI9341_VER_PATCH'?

if i set this values in build_flags its compiled ok

build_flags =
    -Ofast
    -Wall
    -D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE
    -D LV_CONF_PATH=${PROJECT_INCLUDE_DIR}/lv_conf_new.h
    -D ESP_LCD_ST7796_VER_MAJOR=1
    -D ESP_LCD_ST7796_VER_MINOR=2
    -D ESP_LCD_ST7796_VER_PATCH=0
    -D ESP_LCD_ILI9341_VER_MAJOR=1
    -D ESP_LCD_ILI9341_VER_MINOR=2
    -D ESP_LCD_ILI9341_VER_PATCH=0
    -D ESP_LCD_GC9A01_VER_MAJOR=1
    -D ESP_LCD_GC9A01_VER_MINOR=2
    -D ESP_LCD_GC9A01_VER_PATCH=0
    -D CONFIG_ESP_LCD_TOUCH_MAX_POINTS=1
    -D CONFIG_XPT2046_CONVERT_ADC_TO_COORDS
    -D CONFIG_XPT2046_Z_THRESHOLD=600
    -D ESP32_8048S070C
    -D BOARD_HAS_PSRAM     

image

plate ESP32_8048S070C has version 1.3 and using EK9716 driver and capacitive touch panel - GT911 (i2C - 0x5D or 0x14)
Maybe I'm doing something wrong

ESP32-2432S024 (C/R) Variants

Hi, there is a new variant I found on AliExpress with a 2.4" ili9341 based lcd with capacitive and resistive touchscreen options, a powerbank IC (IP5306) for using it with lithium batteries and an USB Type C port for programming.

https://www.aliexpress.com/item/1005005865107357.html

The only problem is the capacitive version has the CST820 driver chip, I couldn't find the datasheet for the chip but I was able to find an arduino sketch that can read touch points from the touchscreen.

https://gist.github.com/busbuyukefe/4a17159627c3ea83b4994f346002f061

I can confirm this code works for the touchscreen.

I tried to create a wrapper based on your library but I couldn't manage to get it done, do you think it is possible to add CST820 functionality without much work?

audio volume

Not really an issue but is it possible to include a volume control? Afaik the tone function got no parameters for the volume?

Use it only with tft_espi not lvgl?

I noticed if i create simple peripheral ble code with boilerplate od your demo app flash is alreday on 99 percent. So i am wondering will removing lvlg lib and usi g only tft_espi help a bit and is it possible at all?

ESP32 8048S070C

Has anyone got the 8048S070C working? I tried the bare minimum branch with the -D ESP32_8048S070C flag set and the board set to board = esp32-s3-devkitc-1.
It compiles and uploads but nothing is displayed. I also tried adding these settings, but still nothing.
board_build.f_cpu = 240000000L
board_build.f_flash = 80000000L
board_build.arduino.partitions = default_16MB.csv
board_build.arduino.memory_type = qio_opi
board_build.flash_mode = qio
board_upload.flash_size = 16MB

Additional Flash

Hi, I bought a ESP32-3248S035C, where U4 is not equipped. Does someone know, which flash I could solder? I've seen in the Sunton specs a 25Q32 4MB flush. My question is, whether also a Winbond 25Q64FV 8MB flush would work?
Best Regards

Extension ports information

Hi Rene,

Sorry this is not really an issue but I would like to get more info about the extension ports on this board.
There are 2 extensions called ' Extended IO' and 'Humidity interface'. I would like to understand if they are the same and if this is safe using them with I2C or SPI devices? Is it ok to use both at the same time?

Also I do not understand how to use the 'Power supply base'. Is it meant to supply the board with a 1s lipo or 18650 battery? If so what are the 2 additionnal pins for? does the board have a charging (protected?) circuit?

If you have any documentation answering my questions I would be happy to read through it.

Thanks a lot for your answers!
Eric

how can i use this with squareline studio

so i got my board (ESP32-2432S028R) and made a simple ui with squareline studio, the software made by lvgl to create draag and drop ui's, but i dont understand how to use the exported files from SQS on this library, is it possible?.

theres a lack of good tutorials and guides for SQS and im new using lvlg, and its my first time trying it

thank you.

undefined reference to `esp_lcd_panel_disp_on_off'

First, thanks for the great effort to provide such a ready to use package, appreciated!

duplicate of rzeldent/esp32-smartdisplay-demo#9, feel free to close which one feels irrelevant.

Getting error to compile the demo project against current master, fails with undefined reference to esp_lcd_panel_disp_on_off'`:

Submodule path 'boards': checked out '5b176b7752100521b82c58407d3483a5e2136173'
Library Manager: [email protected]+sha.bca1535 has been installed!

PACKAGES: 
 - framework-arduinoespressif32 @ 3.20006.221224 (2.0.6) 
 - tool-esptoolpy @ 1.40400.0 (4.4.0) 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5

Dependency Graph
|-- esp32_smartdisplay @ 2.0.2+sha.bca1535
|-- ESP32-audioI2S-master @ 2.0.0+sha.1acd2c1
|-- lvgl @ 8.3.9

Compiling .pio/build/esp32-3248S035C/lib998/esp32_smartdisplay/lvgl_xpt2046.c.o
In file included from /home/sam/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/hal/include/hal/cpu_hal.h:12,
                 from /home/sam/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/esp_cpu.h:14,
                 from /home/sam/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/soc/cpu.h:14,
                 from /home/sam/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h:11,
                 from /home/sam/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/freertos/port/xtensa/include/freertos/portmacro.h:42,
                 from /home/sam/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/freertos/include/freertos/portable.h:51,
                 from /home/sam/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/freertos/include/freertos/FreeRTOS.h:63,
                 from /home/sam/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:33,
                 from .pio/libdeps/esp32-3248S035C/esp32_smartdisplay/include/esp32_smartdisplay.h:4,
                 from .pio/libdeps/esp32-3248S035C/esp32_smartdisplay/src/lvgl_st7796.c:1:
.pio/libdeps/esp32-3248S035C/esp32_smartdisplay/src/lvgl_st7796.c: In function 'lvgl_lcd_init':
.pio/libdeps/esp32-3248S035C/esp32_smartdisplay/src/lvgl_st7796.c:60:21: warning: implicit declaration of function 'esp_lcd_panel_disp_on_off'; did you mean 'esp_lcd_panel_disp_off'? [-Wimplicit-function-declaration]
     ESP_ERROR_CHECK(esp_lcd_panel_disp_on_off(panel_handle, true));
                     ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/sam/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_common/include/esp_err.h:116:30: note: in definition of macro 'ESP_ERROR_CHECK'
         esp_err_t err_rc_ = (x);                                        \
                              ^

Linking .pio/build/esp32-3248S035C/firmware.elf
/home/sam/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32-3248S035C/lib998/libesp32_smartdisplay.a(lvgl_st7796.c.o):(.literal.lvgl_lcd_init+0x2c): undefined reference to `esp_lcd_panel_disp_on_off'
/home/sam/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32-3248S035C/lib998/libesp32_smartdisplay.a(lvgl_st7796.c.o): in function `lvgl_lcd_init':
/home/sam/src/private/esp32-smartdisplay-demo/.pio/libdeps/esp32-3248S035C/esp32_smartdisplay/src/lvgl_st7796.c:56: undefined reference to `esp_lcd_panel_disp_on_off'
collect2: error: ld returned 1 exit status
*** [.pio/build/esp32-3248S035C/firmware.elf] Error 1

Thank you for any advice!

Empty screen at ESP32-2432S032C

LED blinking
The screen backlights work, but the screen is empty (demo)

[ 297][I][main.cpp:26] setup(): CPU: ESP32-D0WD-V3 rev3, CPU Freq: 240 Mhz, 2 core(s)
[ 298][I][main.cpp:27] setup(): Free heap: 248652 bytes
[ 300][I][main.cpp:28] setup(): Free PSRAM: 0 bytes
[ 305][I][main.cpp:29] setup(): SDK version: v4.4.6-dirty

HA58-BFT6aY
3lo-V2R_0Lg

PIO 3.3.0 `${platformio.src_include}` needs to be `${PROJECT_INCLUDE_DIR}`

When building the example I was getting include errors when using the provided platformio.ini. For some reason the include directory was being provided without path separators, i.e. for some reason I was getting the error:

C:UsersUserProjectDirinclude/lv_conf.h: No such file or directory

Replacing ${platformio.src_include} with ${PROJECT_INCLUDE_DIR} (taken from here) fixed the issue.

esp32-2432s028

i got this board and i am wondering how i should put this software onto the board, and which library i should use once i upload it.

and i saw you mention a few codes, like smartdisplay_init(); and smartdisplay_set_led_color(lv_color32_t rgb); where can i find the library with all the codes that where created with this specific software?

Changes on 2432S028R_BGR board (2023-03-28), display looks garbled

Hello,

I've ordered a new model 2432S028R because the touch screen stopped working. When receiving the new unit (2023-03-28) based on the same model, the display is looking garbled. The solution to make the display is to decrease the SPI clock value.

It was changed from 80000000 to 50000000.

Changes made:
#define ILI9341_SPI_FREQ 50000000

I've then tested the same code on the older board, the new SPI_FREQ is still valid.

Just sharing the information with others.

Micropython drivers

Do you have any micropython drivers for this smartdisplay for use with lvgl?

esp32-4848S040C

disp_gpio_num is enable CS

The 4-inch screen relay and I2S audio are shared IO ports, IO1, IO2, and IO40. If audio is needed, the 0 ohm resistors R25, R26, and R27 should be moved to R21, R22, and R23.

display resets with latest firmware

Using the latest version of the library and the smartdisplay demo i get this error.
My display is esp32-3248S035R

PI_FAST_FLASH_BOOT)
flash read err, 988
ets_main.c 384
ets Jul 29 2019 12:21:46

rst:0x10 (RTCWDT_RTC_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
ets Jul 29 2019 12:21:46

Error while I install the library

I get this error:
Invalid library found in C:\Users\lavy1\Documents\Arduino\libraries\esp32-smartdisplay-1.0.8: Missing 'paragraph' from library

screen noise / weird screen behaviour in newer demo version

I switched to the newer demo today, because my code based on the old version and I got into more and more trouble with the dependencies.

I compiled the demo as it is and it works, then I changed the UI to my version and got some "static noise" on the screen.
grafik

First I thought the modules I attached to the GPIO are responsible but then I switched back to the demo UI but included the libs for my attached modules. Still working. So did some changes to the original demo UI within squareline studio. Everything went ok until I put a PNG bitmap in background. The static noise came back.

Since the old demo version (where the rotation of the screen was still set in platformio.ini) something serious must have changed.
You mentioned new drivers for the display?

I could imagine some memory issues that would cause this, my UI hat a bunch of dropdowns select boxes on the first screen.
And it was 16 bit not 16 bit SWAP.

The failures are different in type, on my UI it was mainly in the lower left part of the first screen, on full screen at the second screen. Adding a bitmap to the default UI it is at about 56 pixel from top of the screen.

grafik

Issue with new clone of esp32_smartdisplay and lvgl_ili9341.c

I was compiling the demo fine until all of a sudden this error popped up, and now it wont compile and none of my previous projects are compiling either.

.pio/libdeps/esp32-2432S028Rv2/esp32_smartdisplay/src/lvgl_ili9341.c: In function 'lvgl_lcd_init': .pio/libdeps/esp32-2432S028Rv2/esp32_smartdisplay/src/lvgl_ili9341.c:49:180: error: expected ',' or ';' before '}' token const esp_lcd_panel_dev_config_t panel_dev_config = {.reset_gpio_num = -1, .color_space = ESP_LCD_COLOR_SPACE_BGR, .bits_per_pixel = 16, .vendor_config = ILI9341_VENDOR_CONFIG}; ^ Compiling .pio\build\esp32-2432S028Rv2\lib63e\FFat\FFat.cpp.o *** [.pio\build\esp32-2432S028Rv2\libb84\esp32_smartdisplay\lvgl_ili9341.c.o] Error 1

Do you have any Idea what happened?

ESP32_2432S028R display tearing, landscape/portrait incorrect, vertical direction flipped

I bought two displays recently and just found your wonderful library. I've successfully identified my displays as being of the ESP32_2432S028R type and I've been trying to get them to work correctly.

I'm using the following demo code:

#include <Arduino.h>
#include <ArduinoOTA.h>

#include "esp32_smartdisplay.h"

// LVGL Objects
static lv_obj_t *label_cds;
static lv_obj_t *label_date;
static lv_obj_t *label_ipaddress;

void display_update() {
    char buffer[32];
    itoa(millis(), buffer, 10);
    lv_label_set_text(label_date, buffer);
    lv_label_set_text(label_ipaddress, WiFi.localIP().toString().c_str());
    lv_label_set_text(label_cds, String(smartdisplay_get_light_intensity()).c_str());
}

void btn_event_cb(lv_event_t *e) {
    const std::lock_guard<std::recursive_mutex> lock(lvgl_mutex);

    auto code = lv_event_get_code(e);
    auto btn = lv_event_get_target(e);
    if (code == LV_EVENT_CLICKED) {
        static uint8_t cnt = 0;
        cnt++;

        smartdisplay_beep(1000, 50);

        auto label = lv_obj_get_child(btn, 0);
        lv_label_set_text_fmt(label, "Button: %d", cnt);
    }
}

void mainscreen() {
    const std::lock_guard<std::recursive_mutex> lock(lvgl_mutex);

    // Clear screen
    lv_obj_clean(lv_scr_act());

    // Create a buttom
    auto btn = lv_btn_create(lv_scr_act());
    lv_obj_set_pos(btn, 10, 10);
    lv_obj_set_size(btn, 120, 50);
    lv_obj_add_event_cb(btn, btn_event_cb, LV_EVENT_ALL, NULL);
    // Set label to Button
    auto label = lv_label_create(btn);
    lv_label_set_text(label, "Button");
    lv_obj_center(label);

    // Create a label for the date
    label_date = lv_label_create(lv_scr_act());
    lv_obj_set_style_text_font(label_date, &lv_font_montserrat_22, LV_STATE_DEFAULT);
    lv_obj_align(label_date, LV_ALIGN_BOTTOM_MID, 0, -50);

    // Create a label for the IP Address
    label_ipaddress = lv_label_create(lv_scr_act());
    lv_obj_set_style_text_font(label_ipaddress, &lv_font_montserrat_22, LV_STATE_DEFAULT);
    lv_obj_align(label_ipaddress, LV_ALIGN_BOTTOM_MID, 0, -80);

    // Create a label for the CDS Sensor
    label_cds = lv_label_create(lv_scr_act());
    lv_obj_set_style_text_font(label_cds, &lv_font_montserrat_22, LV_STATE_DEFAULT);
    lv_obj_align(label_cds, LV_ALIGN_TOP_RIGHT, 0, 0);
}

void setup() {
    // put your setup code here, to run once:
    Serial.begin(115200);

    smartdisplay_init();

    WiFi.begin();

    // Set the time servers
    configTime(0, 0, "pool.ntp.org");

    mainscreen();
}

void loop() {
    // put your main code here, to run repeatedly:

    // Red if no wifi, otherwise green
    bool connected = WiFi.isConnected();
    smartdisplay_set_led_color(connected ? lv_color32_t({.ch = {.green = 0xFF}}) : lv_color32_t({.ch = {.red = 0xFF}}));

    ArduinoOTA.handle();

    display_update();
    lv_timer_handler();
}

First, I just set the following compiler flags as per the instructions:
-D ESP32_2432S028R -D TFT_PANEL_ORDER_BGR -D TFT_ORIENTATION_LANDSCAPE -D LV_CONF_PATH=...lv_conf.h
and I got this result:
IMG_7880

Having worked with displays before, this seemed to me like the width/height pixel sizes were wrong, so I switched them in esp32_smartdisplay.h:

#ifdef ESP32_2432S028R
#define TFT_WIDTH 320 // Switched
#define TFT_HEIGHT 240 // Switched
#define ILI9431
#define ILI9431_SPI_SCLK 14

That gave me this result:
IMG_7881

There's two things wrong with this:

  1. I selected the landscape orientation, but it's showing in portrait (that's maybe understandeable given that I manually switched width/height above)
  2. The vertical dimension is flipped. As a proof, if I flip the photo I took, it's correct:
    IMG_7881

Any idea what could be causing this, and what I can do to solve it? Maybe there's some #define I can change? I looked through lv_conf.h and esp32_smartdisplay.h and didn't find anything that seemed useful.

Thank you!

value TFT_ORIENTATION_PORTRAIT is not apply

from current branch feature/esp32s3
when i set TFT_ORIENTATION_PORTRAIT define is not apply on device ESP32_3248S035C
and if a change it on TFT_ORIENTATION_PORTRAIT_INV, device is not change orientation

in main branch it works, but when i upload frimware background of screen is green

Display update question

Hi Rene,

I have one question. Do you know if the behavior that you see in the video is due to hardware limitations of the board or is something linked to software(library or something else). When I change the screen, it takes a while and if I add more things on the second screen, it freezes. If I manage to change the screen, then the widgets are updating fast.

https://youtu.be/-ZpO9WlQyLE

get_light_intensity() is always returning zero

First of all, I would like to thank you for your efforts in creating this library.
I have the ESP32-3248S035C module. The function smartdisplay_get_light_intensity() is always returning zero.
In the esp32_smartdisplay.h file the CDS_PIN is pointed to pin 34.
Is there any particular pin configuration for this board or I bought a defective one?

tks

-D TFT_ORIENTATION_PORTRAIT_INV only changes touch orientation but not tft

I am using the ESP32_3248S035C.
As the title says, the build flag TFT_ORIENTATION_PORTRAIT_INV only changes the touch orientation but not the tft orientation.

build_flags =
# LVGL settings
-D LV_CONF_PATH=${platformio.include_dir}/lv_conf.h
# Smartdisplay settings
-D TFT_PANEL_ORDER_RGB
-D TFT_ORIENTATION_PORTRAIT_INV
-D ESP32_3248S035C

ESP32-2432S028 Board with USB-C not working

Got my ESP32-2432S028 board last week via Aliexpress. This board has, next o micro-usb also an USB-C connector.
Unfortunately I cannot get it working using this library. The screen light up...but remains white.

I ran a test with teh TFT_eSPI linbrary...and found oout that when selecting ILI9431_2_DRIVER I can use the display. Colors are inverted & screen is rotated but this can easily be corrected using:

tft.invertDisplay(1);
tft.setRotation(1);

Any thought on this ?

Weird colors with esp32-8048S070C

Hi all,

i tried the demo application but can't get the screen to work correct.
My colors looking weird...any ideas what i'm doing wrong?

image

This is my platformio.ini

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[platformio]
default_envs = esp32-8048S070C

[env]
platform = espressif32
framework = arduino

monitor_speed = 115200
monitor_rts = 0
monitor_dtr = 0
monitor_filters = esp32_exception_decoder

# Partition scheme for OTA
board_build.partitions = min_spiffs.csv

build_flags =
    -Ofast
    -Wall
    -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE
    # LVGL settings
    -DLV_CONF_PATH=${PROJECT_INCLUDE_DIR}/lv_conf.h

#lib_deps = rzeldent/esp32_smartdisplay
lib_deps =
    https://github.com/rzeldent/esp32-smartdisplay.git
    https://github.com/schreibfaul1/ESP32-audioI2S

[env:esp32-8048S070C]
board = esp32-8048S070C

Help

Hello.
I’ll start by saying that I’m a newbie, I’m collecting information and trying to figure it out myself, but I understand that I can’t figure it out without the help of professionals. Now I am dealing with ESP32-3248S035S and from the first step I was faced with a lack of information and working demo options for studying and testing. I found your article, but I'm not familiar with PlatformIO.
I got acquainted with SQUARDLINE STUDIO, but was faced with the fact that it didn’t work from the first step and quit again because I didn’t know what the problem was. I have a request to YOU, help me make a working version of my project, based on it I will try to move forward in my training.
I can provide you with a GUI to create a working DEMO.
I'm studying on the basis of ArduinoIDE, but if you have time or have instructions for starting my project on PlarformIO
i will be very happy to accept this experience, i will study this direction too.

undefined reference to `lv_font_montserrat_22'

Hi a try example demo from repository and get error when build:

.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\src\main.cpp.o:(.literal._Z10mainscreenv+0x8): undefined reference to `lv_font_montserrat_22'
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\esp32dev\firmware.elf] Error 1
==================================== [FAILED] Took 19.07 seconds ===

platformio.ini:

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino

monitor_speed = 115200

build_flags =
-Ofast
-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE
# LVGL settings
-D LV_CONF_PATH="lv_conf.h"
# Smartdisplay settings
-D TFT_PANEL_ORDER_RGB
#-D TFT_PANEL_ORDER_BGR
#-D TFT_ORIENTATION_PORTRAIT
-D TFT_ORIENTATION_LANDSCAPE
#-D TFT_ORIENTATION_PORTRAIT_INV
#-D TFT_ORIENTATION_LANDSCAPE_INV
-D ESP32_2432S028R
#-D ESP32_3248S035R
#-D ESP32_3248S035C

lib_deps =
rzeldent/esp32_smartdisplay@^1.0.4

thx

ESP32_8048S070C - no mem for frame buffer

I have an ESP32_8048S070C
also info
setup board from the readme

[env:esp32-s3-devkitc-1]
board = esp32-s3-devkitc-1
board_build.arduino.memory_type = qio_opi
board_upload.flash_size = 16MB
board_build.arduino.partitions = app3M_fat9M_16MB.csv

lib_deps = 
    https://github.com/rzeldent/esp32-smartdisplay.git#feature/esp32s3	

build_flags =
    -Ofast
    -Wall
    -D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE
    -D LV_CONF_PATH=${PROJECT_INCLUDE_DIR}/lv_conf_new.h
    -D ESP_LCD_ST7796_VER_MAJOR=1
    -D ESP_LCD_ST7796_VER_MINOR=2
    -D ESP_LCD_ST7796_VER_PATCH=0
    -D ESP_LCD_ILI9341_VER_MAJOR=1
    -D ESP_LCD_ILI9341_VER_MINOR=2
    -D ESP_LCD_ILI9341_VER_PATCH=0
    -D ESP_LCD_GC9A01_VER_MAJOR=1
    -D ESP_LCD_GC9A01_VER_MINOR=2
    -D ESP_LCD_GC9A01_VER_PATCH=0
    -D CONFIG_ESP_LCD_TOUCH_MAX_POINTS=1
    -D CONFIG_XPT2046_CONVERT_ADC_TO_COORDS
    -D CONFIG_XPT2046_Z_THRESHOLD=600
    -D ESP32_8048S070C
    -D BOARD_HAS_PSRAM     

my code

#include "esp_log.h"
#include <esp32_smartdisplay.h>
void setup()
{
    Serial.begin(115200);
    delay(1000);
    ESP_LOGI("Main", "smartdisplay_init");
    smartdisplay_init();
    ESP_LOGI("Main", "ui_init");
}

void loop()
{}

after compiling and upload i got next error with repeated reboot

E (1007) lcd_panel.rgb: esp_lcd_new_rgb_panel(151): no mem for frame buffer

Rebooting...
�ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x28 (SPI_FAST_FLASH_BOOT)
Saved PC:0x420611fe
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbe4
load:0x403cc700,len:0x2a68
entry 0x403c98d4
[   152][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
[  1157][I][main.cpp:27] setup(): [Main] smartdisplay_init
E (1007) 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 0x4037b490
file: ".pio/libdeps/esp32-s3-devkitc-1/esp32_smartdisplay/src/smartdisplay_rgb.c" line 29
func: lvgl_tft_init
expression: esp_lcd_new_rgb_panel(&tft_panel_config, &panel_handle)

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


Backtrace: 0x40377dc6:0x3fceba50 0x4037b49d:0x3fceba70 0x403813d5:0x3fceba90 0x4037b493:0x3fcebb10 0x420276c1:0x3fcebb30 0x42027433:0x3fcebbf0 0x42002431:0x3fcebc10 0x4202a84e:0x3fcebc50

do you have any ideas how to deal with this problem?

and thanks for this useful library

Font rendering

I had to turn on the lvgl subpixel rendering to get better quality on the smaller fonts.

#define LV_USE_FONT_SUBPX 1 in lv_conf.h

Touch not working in capacitive screen

Hi!

I have both resistive and capacitive variations of esp32-3248S035 module. Resistive one works flawlesly. However the capacitive one shows your provided example but the button in the upper left corner does nothing.

In platformio terminal I can see thousands of messages like those:

[ 33475][E][touch_gt911.cpp:61] gt911_num_points_available(): Unable to read COORD_ADDR register
[ 33505][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1
[ 33506][E][touch_gt911.cpp:61] gt911_num_points_available(): Unable to read COORD_ADDR register
[ 33535][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1
[ 33536][E][touch_gt911.cpp:61] gt911_num_points_available(): Unable to read COORD_ADDR register
[ 33566][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error -1

Any clue?
Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.