• 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

touchscreen calibration

Q&A Forum › Category: ESP32 › touchscreen calibration
0 Vote Up Vote Down
Massimiliano Presenti asked 4 weeks ago

Hi, my english is poor, I hope to write correctly the question 😉
In your script on github there are these calculations:
https://github.com/CF20852/ESP32-2432S028-Touchscreen-Calibration/blob/main/RNT_Touchscreen_Cal_6Pts_BLA.ino
line 241
x_scr = alphaX * x_touch + betaX * y_touch + deltaX;
y_scr = alphaY * x_touch + betaY * y_touch + deltaY;
 
In your schetches (Code_Learn_LVGL_Build_GUIs_for_ESP32_Projects_V1_4):
x = alpha_y * p.x + beta_y * p.y + delta_y;
y = alpha_x * p.x + beta_x * p.y + delta_x;
Using these I’m dealing to align the orientation of screen and that of the touchscreen.
Question 1: the origin of the axis (point 0;0) should be on the letf upper or left lower corner?
Question 2: it is normal that the values never reached the extreme values (never x and y <20, never x >280 …)

Question Tags: CYD touchscreen
3 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 4 weeks ago

Hi.
The (0,0) corners will depend on the specific display you have. Even the ones with the same reference, sometimes have the corners in different places. Sometimes, after the calibration, you need to rotate the display.
 
Yes, it is normal that you can’t reach the very extreme values. But, your display might need to be rotated if you are not close to the extremes.
 
What exactly is the model that you have? Does yours have two USB connectors?
 
Regards,
Sara

0 Vote Up Vote Down
Massimiliano Presenti answered 4 weeks ago

Hi Sara, thanks for the reply (despite the holiday).
In the end I managed to solve it by simply using the “map” instructions with different values ​​of the extremes (found empirically).
I have the ESP32-2432S028 (no R at the end, but is a resistive touch), two USB connectors.

0 Vote Up Vote Down
Sara Santos Staff answered 4 weeks ago

Great.
I’m glad you were able to solve the issue.
The display with the two USB connectors is slightly different than ours.
Later, you might also find that it has the colors inverted. If that’s the case, you’ll need to set TFT_INVERSION_ON in the User_Setup.h.
 
Let me know if you need further help.
 
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

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 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.