We see that touch co-ordinates were displayed(x,y). When i try to work with one button other button were pressed do we require touch calibration ? Can you please help me out how we can go further
Resistive touch requires calibration at least once, you can perform calibration and save teh values to NVS
See this example where I’m using LovyanGFX library
#ifdef ESP32_CYD
uint16_t calib[8];
bool calibLoaded = prefs.getBytes("touch_calib", calib, sizeof(calib));
if (calibLoaded)
{
for (int i = 0; i < 8; i++)
{
Timber.i("Stored calib %d: %d", i, calib[i]);
}
tft.setTouchCalibrate(calib);
}
else
{
tft.setTextColor(0xFFFFFFU, 0);
tft.setTextWrap(true, true);
tft.println("Touch calibration required!\nPress center to start then \ntouch the corners as instructed.\nUse a pen or stylus.");
uint16_t touchX, touchY;
while(!tft.getTouch(&touchX, &touchY)) {
delay(100);
}
This file has been truncated. show original