Hi,
I succeeded in following the ESP32 LVGL course with my 2.8 inch CYD, which was different from the one you advised. Next i wanted to repeat the course with a 3.5 inch (320×480) CYD and ran into some trouble. I managed to get the LCD working by adjusting the user_setup.h for the TFT_eSPI library, but then:
Running the touchscreen test of chapter 1.9 i get the following serial monitor output:
16:55:24.429 -> [Warn] (27.570, +0) indev_pointer_proc: Y is 334 which is greater than ver. res lv_indev.c:723
16:55:24.429 ->
16:55:24.461 -> X = -15 | Y = 516 | Pressure = 4101
16:55:24.493 -> [Warn] (27.600, +30) indev_pointer_proc: X is 516 which is greater than hor. res lv_indev.c:717
16:55:24.493 ->
16:55:24.493 -> [Warn] (27.600, +0) indev_pointer_proc: Y is 334 which is greater than ver. res lv_indev.c:723
In the CYD screen i see
x=-15
y=516
z=4101
Possibly i have to adjust the calibration formula, but this pressure of 4101 is displayed without touching the screen
Do you have any idea how i can solve this?
I dit not change the lv_conf.h file.
Thanks in advance.
Addition:
I changed the pin values in the sketch according to the E32R35T CYD specifications:
//** Touchscreen pins aanpassen
#define XPT2046_IRQ 36 // T_IRQ was 36
#define XPT2046_MOSI 13 // T_DIN was 32
#define XPT2046_MISO 12 // T_OUT was 39
#define XPT2046_CLK 14 // T_CLK was 25
#define XPT2046_CS 33 // T_CS was 33
and the height/width:
#define SCREEN_WIDTH 320 //** was 240
#define SCREEN_HEIGHT 480 //** was 320
The rest was not changed.
I would appreciate some reaction
Hi.
I’m sorry for taking so long to get back to you.
For some reason, your question didn’t show up in my area until today…
Usually that error may be because some pin is not declared correctly.
But, it may also be that you need to change this (swap width with height):
#define SCREEN_WIDTH 320 //** was 240
#define SCREEN_HEIGHT 480 //** was 320
There may be some definitions in the User_setup that you might need to change for that screen.
Or you may need to change the rotation of the touchscreen so that it isn’t out of range:
touchscreen.setRotation(2);
You can use a number between 0 and 2.
I hope this helps, and I’m sorry for the delay in my response.
Regards,
Sara
I got it working. Had to use a different screen driver (the one supplied by the manufacurer) adjust both setup files (lvgl and TFT) and the pins in the sketches.
Rotation and screen size were ok.
So I am happy.
Regards,
M