I test with this code
#include <UTFT.h>
#include <UTouch.h>
extern uint8_t BigFont[];UTFT myGLCD(ITDB32WD,38,39,40,41);
UTouch myTouch( 6, 5, 4, 3, 2);void setup()
{
myGLCD.InitLCD();`
myGLCD.clrScr();myTouch.InitTouch();
myTouch.setPrecision(PREC_MEDIUM);
}void loop()
{
long x, y;
myGLCD.setFont(BigFont);while (myTouch.dataAvailable() == true)
{
myTouch.read();
x = myTouch.getX();
y = myTouch.getY();
if ((x!=-1) and (y!=-1))
{
myGLCD.clrScr();
myGLCD.print("o", 310-x , y-6 , 0);
myGLCD.printNumI(310-x, CENTER, 0); //X axis
myGLCD.printNumI(y-6, CENTER, 16); //Y axis
}
}
}
I invert the X Axis and add/subtract some unit.
In the left of screen, all great.
In the right of screen, X axis not right
see it, you will know