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 …)
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
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.
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