• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Using an E32R35T 3.5 inch CYD instead of a 2.8 inch E32R28T: trouble with touch screen

Q&A Forum › Using an E32R35T 3.5 inch CYD instead of a 2.8 inch E32R28T: trouble with touch screen
0 Vote Up Vote Down
mmmE asked 2 weeks ago

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.

6 Answers
0 Vote Up Vote Down
mmmE answered 2 weeks ago

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

0 Vote Up Vote Down
Sara Santos Staff answered 7 days ago

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
 

0 Vote Up Vote Down
mmmE answered 7 days ago

Hi Sara,
Thanks, i will try out.
Regards,
M

0 Vote Up Vote Down
Sara Santos Staff answered 7 days ago

Then, let me know your results.
 
Regards,
Sara

0 Vote Up Vote Down
mmmE answered 4 days ago

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

0 Vote Up Vote Down
Sara Santos Staff answered 3 days ago

Great.
When using different display models, we usually need different configurations.
 
I’m glad everything is working as expected now.
 
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Smart Home with Raspberry Pi, ESP32, and ESP8266 V1.6 September 9, 2025
  • [eBook Updated] Learn LVGL: Build GUIs for ESP32 Projects – Version 1.5 July 7, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.