Comments on: ESP32 Cheap Yellow Display (CYD) Resistive Touchscreen Calibration https://randomnerdtutorials.com/esp32-cheap-yellow-display-cyd-resistive-touchscreen-calibration/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Mon, 16 Jun 2025 14:48:59 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: EJ https://randomnerdtutorials.com/esp32-cheap-yellow-display-cyd-resistive-touchscreen-calibration/#comment-1058090 Mon, 16 Jun 2025 14:48:59 +0000 https://randomnerdtutorials.com/?p=161067#comment-1058090 Is there a way to do this in micropython? it would be great if it was.

Thanks

]]>
By: Favor https://randomnerdtutorials.com/esp32-cheap-yellow-display-cyd-resistive-touchscreen-calibration/#comment-997266 Sun, 05 Jan 2025 07:43:25 +0000 https://randomnerdtutorials.com/?p=161067#comment-997266 Hi, In all of your codes and examples, you were using a screen in horizontal mode. However, I wnat to use the screen in vertical mode. Intiall with XPT2046_Touchscreen, things works fines, becuase it has methods to rotate the touchscreen. But now I’m trying to use the XPT2046_Bitbang, because I want to take advantage of software SPI for interfacing with SD card.
However, it doesn’t have methods to rotate touchscreen. What should I do iin this case?
Any help please?

]]>
By: Les Adams https://randomnerdtutorials.com/esp32-cheap-yellow-display-cyd-resistive-touchscreen-calibration/#comment-991438 Sat, 14 Dec 2024 13:13:10 +0000 https://randomnerdtutorials.com/?p=161067#comment-991438 Sorry this should have read …
Hi,
in your Touchscreen Testing section you have the following code:-
x = alpha_y * p.x + beta_y * p.y + delta_y;
// clamp x between 0 and SCREEN_WIDTH – 1
y = alpha_x * p.x + beta_x * p.y + delta_x;
// clamp y between 0 and SCREEN_HEIGHT – 1

Shouldn’t this be :-
x = alpha_x * p.x + beta_x * p.x + delta_x;
// clamp x between 0 and SCREEN_WIDTH – 1
y = alpha_y * p.y + beta_y * p.y + delta_y;
// clamp y between 0 and SCREEN_HEIGHT – 1

Les

]]>
By: Les Adams https://randomnerdtutorials.com/esp32-cheap-yellow-display-cyd-resistive-touchscreen-calibration/#comment-991437 Sat, 14 Dec 2024 13:10:42 +0000 https://randomnerdtutorials.com/?p=161067#comment-991437 Hi,
in your Touchscreen Testing section you have the following code:-
x = alpha_y * p.x + beta_y * p.y + delta_y;
// clamp x between 0 and SCREEN_WIDTH – 1
y = alpha_x * p.x + beta_x * p.y + delta_x;
// clamp y between 0 and SCREEN_HEIGHT – 1

Shouldn’t this be :-
x = alpha_x * p.x + beta_x * p.y + delta_x;
// clamp x between 0 and SCREEN_WIDTH – 1
y = alpha_y * p.x + beta_y * p.y + delta_y;
// clamp y between 0 and SCREEN_HEIGHT – 1

Les

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-cheap-yellow-display-cyd-resistive-touchscreen-calibration/#comment-946751 Fri, 09 Aug 2024 10:23:02 +0000 https://randomnerdtutorials.com/?p=161067#comment-946751 In reply to Paul.

Hi.
What do you mean?
I don’t think I understood your question…
Preferences.h is a library included by default on the ESP32 core in the Arduino ide.
Regards,
Sara

]]>
By: Paul https://randomnerdtutorials.com/esp32-cheap-yellow-display-cyd-resistive-touchscreen-calibration/#comment-946444 Thu, 08 Aug 2024 11:07:15 +0000 https://randomnerdtutorials.com/?p=161067#comment-946444 In reply to Sara Santos.

I see this in your code:
// The following lines were added for retrieval of resistive touchscreen to
display coordinate transformation equation coefficients.
#include <Preferences.h>

My question is how should the Preferences.h file be formatted?
Can you post an example?

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-cheap-yellow-display-cyd-resistive-touchscreen-calibration/#comment-946199 Wed, 07 Aug 2024 22:14:00 +0000 https://randomnerdtutorials.com/?p=161067#comment-946199 In reply to Paul.

Hi.
Here’s the link: https://github.com/CF20852/ESP32-2432S028-Touchscreen-Calibration
Regards,
sara

]]>
By: Paul https://randomnerdtutorials.com/esp32-cheap-yellow-display-cyd-resistive-touchscreen-calibration/#comment-946164 Wed, 07 Aug 2024 19:40:33 +0000 https://randomnerdtutorials.com/?p=161067#comment-946164 Can you supply an example of a Preferences.h file so we can see the format?
Thanks…

]]>