I have a iteadstudio 2.4 tft touch shield that currently works with my Arduino Uno R3 board.
I now want to get this shield working on the Arduino Mega 2560 R3 board.
first up this shield is a little old,
the manufactures does state that the board does work with the Arduino Mega
link http://imall.iteadstudio.com/development-platform/im120417012.html
this is the code from my sketch
#include <UTFT.h>
#include <UTouch.h>
// Uncomment the next two lines for the Arduino Mega
//This is my attemp in trying to initialize shield
UTFT myGLCD(ITDB24E_8, A5,A4,A3,A2); // Remember to change the model parameter to suit your display module!
UTouch myTouch( A1, 10, A0, 8, 9); // original values 6,5,4,3,2);
// Declare which fonts we will be using
extern uint8_t SmallFont[];
extern uint8_t BigFont[];
void setup(void)
{
/* Start Ethernet sheild */
Ethernet.begin( mac,ip,subnet,gateway );
delay( 100 );
/* Initalize LCD screen */
myGLCD.InitLCD( 1 );
/* Clear LCD Screen */
myGLCD.clrScr();
//myGLCD.setColor(0, 255, 0);
myGLCD.setBackColor( VGA_AQUA );
myGLCD.setFont( BigFont );
myTouch.InitTouch( 1 );
myTouch.setPrecision(PREC_HI);
drawLCD();
}
void loop(void)
{
if( myTouch.dataAvailable() )
{
myTouch.read();
x = myTouch.getX();
y = myTouch.getY();
if( ( y >= 15 ) && ( y <= 122 ) )
{
if( (x >= 2 ) && ( x <= 148 ) )
{
//waitForItTemp0(5,5,309,230);
//backButtonTemp0();
}
}
}