Hi all! I bought a TFT 3.2" touch screen from china, I am using it on arduino mega, but when I load a sketch the imege show in a mirror form. the touch works in opposite side. please can ny one help me.
Please note that I am using Rinky-Dink Electronics UTFT library.
#include <UTFT.h>
#include <URTouch.h>
UTFT myGLCD(CTE32HR,38,39,40,41);
URTouch myTouch( 6, 5, 4, 3, 2);
extern uint8_t BigFont[];
int x, y;
char stCurrent[20]="";
int stCurrentLen=0;
char stLast[20]="";
void setup()
{
myGLCD.InitLCD();
myGLCD.clrScr();
myTouch.InitTouch();
myTouch.setPrecision(PREC_MEDIUM);
}
void loop()
{
long x, y;
while (myTouch.dataAvailable() == true)
{
myTouch.read();
x = myTouch.getX();
y = myTouch.getY();
if ((x!=-1) and (y!=-1))
{
myGLCD.drawPixel (x, y);
}
}
}