TFT LCD v1.0 Touchscreen help

So I got this sainsmart TFT LCD touch screen from amazon. Comes with the TFT LCD v1.0 shield and the actual touchscreen. I've been wrestling with this like crazy and it's driving me insane. I've been using the UTFT libraries and at this point just simply trying to get the demos to work. After some research I found someone claimed the TFT LCD v1.0 shield had some issues and was able to fix it by doing this:

http://www.hostingpics.net/viewer.php?id=2478242012091119152479.jpg

So I did it. At least a shot to fix the SD card reader... Then I realized the mega won't read anything over FAT16 and I only have a 8g SD card... So I moved on to trying to get the touch screen to register a touch. I tried using the UTFT examples and can only get a display, no touch. Anyone else have the same problems or can suggest some solutions?

Here's my code:

(( Taken out and posted below ))

There is nothing in "your" code about the touchscreen. You have to use the Utouch library. Also edit your post and use code tags (the # button in the edit box).

I use a Toshiba M01G 1GB SD card (found on ebay for 2€), no problem using SPISPEED_VERYFAST, but you may have to remove the 2 other resistors (one on each side of the modification you did) and of course make a bridge between the pads (put a short lenght of wire or, what I used, a little piece of a male pin header).

Sorry about that. Tags change with every website it seems, I got confused. I also posted the wrong code. And like I said above, I'm not claiming this as my code, it's straight from the UTFT examples. Only reason I'm posting it is because last time I posted a problem involving a library example, someone complained I didn't post the code.

Regardless, here's the correct code:

// UTFT_Buttons_Bitmap_Demo (C)2013 Henning Karlsen
// web: http://www.henningkarlsen.com/electronics
//
// A small demo to demonstrate the use of some of the
// functions of the UTFT_Buttons add-on library.
//
// This demo was made for modules with a screen resolution 
// of 320x240 pixels, but should work on larger screens as
// well.
//
// This demo will not work on Arduino 2009/Uno/Leonardo
// due to the size of the images.
//
// This program requires both the UTFT and UTouch libraries
// in addition to the UTFT_Buttons add-on library.
//

// This code block is only needed to support multiple
// MCU architectures in a single sketch.
#if defined(__AVR__)
	#define imagedatatype  unsigned int
#elif defined(__PIC32MX__)
	#define imagedatatype  unsigned short
#elif defined(__arm__)
	#define imagedatatype  unsigned short
#endif
// End of multi-architecture block

#include <UTFT.h>
#include <UTouch.h>
#include <UTFT_Buttons.h>

// Declare which fonts we will be using
extern uint8_t BigFont[];

// Declare which bitmaps we will be using
extern imagedatatype cat[];
extern imagedatatype dog[];
extern imagedatatype bird[];
extern imagedatatype monkey[];

// Set up UTFT...
// Set the pins to the correct ones for your development board
// -----------------------------------------------------------
// Standard Arduino 2009/Uno/Leonardo shield   : NOT SUPPORTED DUE TO LACK OF MEMORY
// Standard Arduino Mega/Due shield            : <display model>,38,39,40,41
// CTE TFT LCD/SD Shield for Arduino Due       : <display model>,25,26,27,28
// Standard chipKit Uno32/uC32                 : <display model>,34,35,36,37
// Standard chipKit Max32                      : <display model>,82,83,84,85
// AquaLEDSource All in One Super Screw Shield : <display model>,82,83,84,85
//
// Remember to change the model parameter to suit your display module!
UTFT          myGLCD(ITDB32S,38,39,40,41);

// Set up UTouch...
// Set the pins to the correct ones for your development board
// -----------------------------------------------------------
// Standard Arduino 2009/Uno/Leonardo shield   : NOT SUPPORTED DUE TO LACK OF MEMORY
// Standard Arduino Mega/Due shield            : 6,5,4,3,2
// CTE TFT LCD/SD Shield for Arduino Due       : 6,5,4,3,2
// Standard chipKit Uno32/uC32                 : 20,21,22,23,24
// Standard chipKit Max32                      : 62,63,64,65,66
// AquaLEDSource All in One Super Screw Shield : 62,63,64,65,66
UTouch        myTouch(6,5,4,3,2);

// Finally we set up UTFT_Buttons :)
UTFT_Buttons  myButtons(&myGLCD, &myTouch);

void setup()
{
  myGLCD.InitLCD();
  myGLCD.clrScr();
  myGLCD.setFont(BigFont);

  myTouch.InitTouch();
  myTouch.setPrecision(PREC_MEDIUM);
  
  myButtons.setTextFont(BigFont);
}

void loop()
{
  int but1, but2, but3, but4, but5, pressed_button;
  
  but1 = myButtons.addButton( 10,  10, 80,  60, cat);
  but2 = myButtons.addButton( 120,  10, 80,  60, dog);
  but3 = myButtons.addButton( 10,  80, 80,  60, bird);
  but4 = myButtons.addButton( 120,  80, 80,  60, monkey, BUTTON_NO_BORDER);
  but5 = myButtons.addButton( 10, 150, 190, 30, "Disable Dog");
  myButtons.drawButtons();

  myGLCD.print("You pressed:", 10, 200);
  myGLCD.setColor(VGA_BLACK);
  myGLCD.setBackColor(VGA_WHITE);
  myGLCD.print("None    ", 10, 220);

  while(1) 
  {
    if (myTouch.dataAvailable() == true)
    {
      pressed_button = myButtons.checkButtons();

      if (pressed_button==but5)
        if (myButtons.buttonEnabled(but2))
        {
          myButtons.disableButton(but2);
          myButtons.relabelButton(but5, "Enable Dog", true);
          myButtons.drawButton(but2);
        }
        else
        {
          myButtons.enableButton(but2);
          myButtons.relabelButton(but5, "Disable Dog", true);
          myButtons.drawButton(but2);
        }

      if (pressed_button==but1)
        myGLCD.print("Cat     ", 10, 220);
      if (pressed_button==but2)
        myGLCD.print("Dog     ", 10, 220);
      if (pressed_button==but3)
        myGLCD.print("Bird    ", 10, 220);
      if (pressed_button==but4)
        myGLCD.print("Monkey  ", 10, 220);
      if (pressed_button==-1)
        myGLCD.print("None    ", 10, 220);
    }
  }
}
  but1 = myButtons.addButton( 10,  10, 80,  60, cat);
  but2 = myButtons.addButton( 120,  10, 80,  60, dog);
  but3 = myButtons.addButton( 10,  80, 80,  60, bird);
  but4 = myButtons.addButton( 120,  80, 80,  60, monkey, BUTTON_NO_BORDER);
  but5 = myButtons.addButton( 10, 150, 190, 30, "Disable Dog");
  myButtons.drawButtons();

Why are you adding more buttons on every pass through loop()?

So I simply left this as the example. If I had wrote it, I probably wouldn't be initiating things repeatedly in the loop. So I moved it out just in case to look like this:

// UTFT_Buttons_Bitmap_Demo (C)2013 Henning Karlsen
// web: http://www.henningkarlsen.com/electronics
//
// A small demo to demonstrate the use of some of the
// functions of the UTFT_Buttons add-on library.
//
// This demo was made for modules with a screen resolution 
// of 320x240 pixels, but should work on larger screens as
// well.
//
// This demo will not work on Arduino 2009/Uno/Leonardo
// due to the size of the images.
//
// This program requires both the UTFT and UTouch libraries
// in addition to the UTFT_Buttons add-on library.
//

// This code block is only needed to support multiple
// MCU architectures in a single sketch.
#if defined(__AVR__)
	#define imagedatatype  unsigned int
#elif defined(__PIC32MX__)
	#define imagedatatype  unsigned short
#elif defined(__arm__)
	#define imagedatatype  unsigned short
#endif
// End of multi-architecture block

#include <UTFT.h>
#include <UTouch.h>
#include <UTFT_Buttons.h>

// Declare which fonts we will be using
extern uint8_t BigFont[];

// Declare which bitmaps we will be using
extern imagedatatype cat[];
extern imagedatatype dog[];
extern imagedatatype bird[];
extern imagedatatype monkey[];

// Set up UTFT...
// Set the pins to the correct ones for your development board
// -----------------------------------------------------------
// Standard Arduino 2009/Uno/Leonardo shield   : NOT SUPPORTED DUE TO LACK OF MEMORY
// Standard Arduino Mega/Due shield            : <display model>,38,39,40,41
// CTE TFT LCD/SD Shield for Arduino Due       : <display model>,25,26,27,28
// Standard chipKit Uno32/uC32                 : <display model>,34,35,36,37
// Standard chipKit Max32                      : <display model>,82,83,84,85
// AquaLEDSource All in One Super Screw Shield : <display model>,82,83,84,85
//
// Remember to change the model parameter to suit your display module!
UTFT          myGLCD(ITDB32S,38,39,40,41);

// Set up UTouch...
// Set the pins to the correct ones for your development board
// -----------------------------------------------------------
// Standard Arduino 2009/Uno/Leonardo shield   : NOT SUPPORTED DUE TO LACK OF MEMORY
// Standard Arduino Mega/Due shield            : 6,5,4,3,2
// CTE TFT LCD/SD Shield for Arduino Due       : 6,5,4,3,2
// Standard chipKit Uno32/uC32                 : 20,21,22,23,24
// Standard chipKit Max32                      : 62,63,64,65,66
// AquaLEDSource All in One Super Screw Shield : 62,63,64,65,66
UTouch        myTouch(6,5,4,3,2);

// Finally we set up UTFT_Buttons :)
UTFT_Buttons  myButtons(&myGLCD, &myTouch);
int but1, but2, but3, but4, but5, pressed_button;

void setup()
{
  myGLCD.InitLCD();
  myGLCD.clrScr();
  myGLCD.setFont(BigFont);

  myTouch.InitTouch();
  myTouch.setPrecision(PREC_MEDIUM);
  
  myButtons.setTextFont(BigFont);
  
  but1 = myButtons.addButton( 10,  10, 80,  60, cat);
  but2 = myButtons.addButton( 120,  10, 80,  60, dog);
  but3 = myButtons.addButton( 10,  80, 80,  60, bird);
  but4 = myButtons.addButton( 120,  80, 80,  60, monkey, BUTTON_NO_BORDER);
  but5 = myButtons.addButton( 10, 150, 190, 30, "Disable Dog");
  myButtons.drawButtons();
  
}

void loop()
{
  myGLCD.print("You pressed:", 10, 200);
  myGLCD.setColor(VGA_BLACK);
  myGLCD.setBackColor(VGA_WHITE);
  myGLCD.print("None    ", 10, 220);

  while(1) 
  {
    if (myTouch.dataAvailable() == true)
    {
      pressed_button = myButtons.checkButtons();

      if (pressed_button==but5)
        if (myButtons.buttonEnabled(but2))
        {
          myButtons.disableButton(but2);
          myButtons.relabelButton(but5, "Enable Dog", true);
          myButtons.drawButton(but2);
        }
        else
        {
          myButtons.enableButton(but2);
          myButtons.relabelButton(but5, "Disable Dog", true);
          myButtons.drawButton(but2);
        }

      if (pressed_button==but1)
        myGLCD.print("Cat     ", 10, 220);
      if (pressed_button==but2)
        myGLCD.print("Dog     ", 10, 220);
      if (pressed_button==but3)
        myGLCD.print("Bird    ", 10, 220);
      if (pressed_button==but4)
        myGLCD.print("Monkey  ", 10, 220);
      if (pressed_button==-1)
        myGLCD.print("None    ", 10, 220);
    }
  }
}

I still can't get the touch screen to register a touch. I also bought a 4gb sd card and formatted it to FAT, but I still can't read that either. For that, I'm using the following example from UTFT:

// Demo_Landscape (C)2013 Henning Karlsen
// web: http://www.henningkarlsen.com/electronics
//
// This program is a demo of the loadBitmap()-function.
//
// This program requires UTFT_tinyFAT, UTFT v2.41 or higher, 
// as well as tinyFAT v3.0 or higher.
//
// The image files must be present in the root folder 
// of a FAT16 formatted SDcard in the module cardslot.
//
// Please note that this demo only supports the following
// display sizes:
//      220x176
//      320x240
//      400x240
//      480x272
//      800x480

#include <tinyFAT.h>
#include <UTFT.h>
#include <UTFT_tinyFAT.h>

// Declare which fonts we will be using
extern uint8_t SmallFont[];

UTFT         myGLCD(ITDB32S, 38, 39, 40, 41);   // Remember to change the model parameter to suit your display module!
UTFT_tinyFAT myFiles(&myGLCD);

// List of filenames for pictures to display. 
char* files320[]={"PIC301.RAW", "PIC302.RAW", "PIC303.RAW", "PIC304.RAW", "PIC305.RAW", "PIC306.RAW", "PIC307.RAW", "PIC308.RAW", "PIC309.RAW", "PIC310.RAW"}; // 320x240
char* files400[]={"PIC401.RAW", "PIC402.RAW", "PIC403.RAW", "PIC404.RAW", "PIC405.RAW", "PIC406.RAW", "PIC407.RAW", "PIC408.RAW", "PIC409.RAW", "PIC410.RAW"}; // 400x240
char* files220[]={"PIC601.RAW", "PIC602.RAW", "PIC603.RAW", "PIC604.RAW", "PIC605.RAW", "PIC606.RAW", "PIC607.RAW", "PIC608.RAW", "PIC609.RAW", "PIC610.RAW"}; // 220x176
char* files480[]={"PIC701.RAW", "PIC702.RAW", "PIC703.RAW", "PIC704.RAW", "PIC705.RAW", "", "", "", "", ""}; // 480x272
char* files800[]={"PIC801.RAW", "PIC802.RAW", "PIC803.RAW", "PIC804.RAW", "PIC805.RAW", "", "", "", "", ""}; // 800x480
char* files[10];

int picsize_x, picsize_y;
boolean display_rendertime=false;  // Set this to true if you want the rendertime to be displayed after a picture is loaded
boolean display_filename=true;  // Set this to false to disable showing of filename

word res;
long sm, em;

void setup()
{
  myGLCD.InitLCD();
  myGLCD.clrScr();
  file.initFAT();
  myGLCD.setColor(255,255,255);
  myGLCD.setFont(SmallFont);
  picsize_x=myGLCD.getDisplayXSize();
  picsize_y=myGLCD.getDisplayYSize();
  switch (picsize_x)
  {
    case 220:
      for (int z=0; z<sizeof(files220)/sizeof(*files220);z++)
        files[z] = files220[z];
      break;
    case 320:
      for (int z=0; z<sizeof(files320)/sizeof(*files320);z++)
        files[z] = files320[z];
      break;
    case 400:
      for (int z=0; z<sizeof(files400)/sizeof(*files400);z++)
        files[z] = files400[z];
      break;
    case 480:
      for (int z=0; z<sizeof(files480)/sizeof(*files480);z++)
        files[z] = files480[z];
      break;
    case 800:
      for (int z=0; z<sizeof(files800)/sizeof(*files800);z++)
        files[z] = files800[z];
      break;
  }
}

void loop()
{
  
  for (int i=0; i<(sizeof(files)/sizeof(*files)); i++)
  {
    if (files[i]!="")
    {
      sm=millis();
      res=myFiles.loadBitmap(0, 0, picsize_x, picsize_y, files[i]);
      em=millis();
      if (res!=0)
      {
        if (res==0x10)
        {
          myGLCD.print("File not found...", 0, 0);
          myGLCD.print(files[i], 0, 14);
        }
        else
        {
          myGLCD.print("ERROR: ", 0, 0);
          myGLCD.printNumI(res, 56, 0);
        }
        delay(3000);
        myGLCD.clrScr();
      }
      else
      {
        if (display_rendertime==true)
        {
          myGLCD.print("Rendertime (secs):", 0, 0);
          myGLCD.printNumF(float((em-sm)/1000.0), 2, 160,0);
        }
        if (display_filename==true)
        {
          myGLCD.print(files[i], CENTER, myGLCD.getDisplayYSize()-12);
        }
        delay(3000);
      }
    }
  }
}

This is really driving me nuts, is it possible they sent me a piece of crap and I need a new one?

So I've reduced the examples down to its bare minimum to try and get a very simple program that will tell me if a button is pressed. Can anyone confirm if this is correct?

This is exactly what I ordered:

And here's the code:

#include <UTFT.h>
#include <UTouch.h>
#include <UTFT_Buttons.h>

extern uint8_t SmallFont[];
extern uint8_t BigFont[];
extern uint8_t Dingbats1_XL[];

UTFT myGLCD(ITDB32S, 38, 39, 40, 41);

UTouch myTouch(6, 5, 4, 3, 2);

UTFT_Buttons myButtons(&myGLCD, &myTouch);

int button1, buttonX, buttonY, bPressed;
boolean default_colors = true;

void setup() {
  myGLCD.InitLCD();
  myGLCD.clrScr();
  myGLCD.setFont(SmallFont);
  
  myTouch.InitTouch();
  myTouch.setPrecision(PREC_LOW);
  
  myButtons.setTextFont(BigFont);
  myButtons.setSymbolFont(Dingbats1_XL);
  
  button1 = myButtons.addButton( 10, 20, 300, 30, "Button 1");
  myButtons.drawButtons();
  
  myGLCD.setColor(VGA_BLACK);
  myGLCD.print("None   ", 110, 220);
  
  Serial.begin(9600);
  Serial.println("Start");
}

void loop() {
  Serial.println(button1);
}

Thanks again for the patience and any help you can give.

I'd suggest that you perform a search of the forum. See how many posts there are by SainSmart. The only time they post, that I can recall, is to announce that they have some new product. I'd suggest that people should stop buying from them if they can't support the products that they sell.

I'd also suggest that you should be asking them about the problems you are having. They are not Arduino issues.

If anyone else has the same shield, and has gotten it to work with the same Arduino, I hope that they chime in.

Endevor try this sketch:

// UTouch_ButtonTest (C)2010-2012 Henning Karlsen
// web: http://www.henningkarlsen.com/electronics
//
// This program is a quick demo of how create and use buttons.
//
// This program requires the UTFT library.
//
// It is assumed that the display module is connected to an
// appropriate shield or that you know how to change the pin 
// numbers in the setup.
//

#include <UTFT.h>
#include <UTouch.h>

// Declare which fonts we will be using
extern uint8_t BigFont[];

// Uncomment the next two lines for the Arduino 2009/UNO
//UTFT        myGLCD(ITDB24D,19,18,17,16);   // Remember to change the model parameter to suit your display module!
//UTouch      myTouch(15,10,14,9,8);

// Uncomment the next two lines for the Arduino Mega
UTFT        myGLCD(ITDB32S, 38,39,40,41);   // Remember to change the model parameter to suit your display module!
UTouch      myTouch(6,5,4,3,2);

int x, y;
char stCurrent[20]="";
int stCurrentLen=0;
char stLast[20]="";

/*************************
**   Custom functions   **
*************************/

void drawButtons()
{
// Draw the upper row of buttons
  for (x=0; x<5; x++)
  {
    myGLCD.setColor(0, 0, 255);
    myGLCD.fillRoundRect (10+(x*60), 10, 60+(x*60), 60);
    myGLCD.setColor(255, 255, 255);
    myGLCD.drawRoundRect (10+(x*60), 10, 60+(x*60), 60);
    myGLCD.printNumI(x+1, 27+(x*60), 27);
  }
// Draw the center row of buttons
  for (x=0; x<5; x++)
  {
    myGLCD.setColor(0, 0, 255);
    myGLCD.fillRoundRect (10+(x*60), 70, 60+(x*60), 120);
    myGLCD.setColor(255, 255, 255);
    myGLCD.drawRoundRect (10+(x*60), 70, 60+(x*60), 120);
    if (x<4)
      myGLCD.printNumI(x+6, 27+(x*60), 87);
  }
  myGLCD.print("0", 267, 87);
// Draw the lower row of buttons
  myGLCD.setColor(0, 0, 255);
  myGLCD.fillRoundRect (10, 130, 150, 180);
  myGLCD.setColor(255, 255, 255);
  myGLCD.drawRoundRect (10, 130, 150, 180);
  myGLCD.print("Clear", 40, 147);
  myGLCD.setColor(0, 0, 255);
  myGLCD.fillRoundRect (160, 130, 300, 180);
  myGLCD.setColor(255, 255, 255);
  myGLCD.drawRoundRect (160, 130, 300, 180);
  myGLCD.print("Enter", 190, 147);
  myGLCD.setBackColor (0, 0, 0);
}

void updateStr(int val)
{
  if (stCurrentLen<20)
  {
    stCurrent[stCurrentLen]=val;
    stCurrent[stCurrentLen+1]='\0';
    stCurrentLen++;
    myGLCD.setColor(0, 255, 0);
    myGLCD.print(stCurrent, LEFT, 224);
  }
  else
  {
    myGLCD.setColor(255, 0, 0);
    myGLCD.print("BUFFER FULL!", CENTER, 192);
    delay(500);
    myGLCD.print("            ", CENTER, 192);
    delay(500);
    myGLCD.print("BUFFER FULL!", CENTER, 192);
    delay(500);
    myGLCD.print("            ", CENTER, 192);
    myGLCD.setColor(0, 255, 0);
  }
}

// Draw a red frame while a button is touched
void waitForIt(int x1, int y1, int x2, int y2)
{
  myGLCD.setColor(255, 0, 0);
  myGLCD.drawRoundRect (x1, y1, x2, y2);
  while (myTouch.dataAvailable())
    myTouch.read();
  myGLCD.setColor(255, 255, 255);
  myGLCD.drawRoundRect (x1, y1, x2, y2);
}

/*************************
**  Required functions  **
*************************/

void setup()
{
// Initial setup
  myGLCD.InitLCD();
  myGLCD.clrScr();

  myTouch.InitTouch();
  myTouch.setPrecision(PREC_MEDIUM);

  myGLCD.setFont(BigFont);
  myGLCD.setBackColor(0, 0, 255);
  drawButtons();  
}

void loop()
{
  while (true)
  {
    if (myTouch.dataAvailable())
    {
      myTouch.read();
      x=myTouch.getX();
      y=myTouch.getY();
      
      if ((y>=10) && (y<=60))  // Upper row
      {
        if ((x>=10) && (x<=60))  // Button: 1
        {
          waitForIt(10, 10, 60, 60);
          updateStr('1');
        }
        if ((x>=70) && (x<=120))  // Button: 2
        {
          waitForIt(70, 10, 120, 60);
          updateStr('2');
        }
        if ((x>=130) && (x<=180))  // Button: 3
        {
          waitForIt(130, 10, 180, 60);
          updateStr('3');
        }
        if ((x>=190) && (x<=240))  // Button: 4
        {
          waitForIt(190, 10, 240, 60);
          updateStr('4');
        }
        if ((x>=250) && (x<=300))  // Button: 5
        {
          waitForIt(250, 10, 300, 60);
          updateStr('5');
        }
      }

      if ((y>=70) && (y<=120))  // Center row
      {
        if ((x>=10) && (x<=60))  // Button: 6
        {
          waitForIt(10, 70, 60, 120);
          updateStr('6');
        }
        if ((x>=70) && (x<=120))  // Button: 7
        {
          waitForIt(70, 70, 120, 120);
          updateStr('7');
        }
        if ((x>=130) && (x<=180))  // Button: 8
        {
          waitForIt(130, 70, 180, 120);
          updateStr('8');
        }
        if ((x>=190) && (x<=240))  // Button: 9
        {
          waitForIt(190, 70, 240, 120);
          updateStr('9');
        }
        if ((x>=250) && (x<=300))  // Button: 0
        {
          waitForIt(250, 70, 300, 120);
          updateStr('0');
        }
      }

      if ((y>=130) && (y<=180))  // Upper row
      {
        if ((x>=10) && (x<=150))  // Button: Clear
        {
          waitForIt(10, 130, 150, 180);
          stCurrent[0]='\0';
          stCurrentLen=0;
          myGLCD.setColor(0, 0, 0);
          myGLCD.fillRect(0, 224, 319, 239);
        }
        if ((x>=160) && (x<=300))  // Button: Enter
        {
          waitForIt(160, 130, 300, 180);
          if (stCurrentLen>0)
          {
            for (x=0; x<stCurrentLen+1; x++)
            {
              stLast[x]=stCurrent[x];
            }
            stCurrent[0]='\0';
            stCurrentLen=0;
            myGLCD.setColor(0, 0, 0);
            myGLCD.fillRect(0, 208, 319, 239);
            myGLCD.setColor(0, 255, 0);
            myGLCD.print(stLast, LEFT, 208);
          }
          else
          {
            myGLCD.setColor(255, 0, 0);
            myGLCD.print("BUFFER EMPTY", CENTER, 192);
            delay(500);
            myGLCD.print("            ", CENTER, 192);
            delay(500);
            myGLCD.print("BUFFER EMPTY", CENTER, 192);
            delay(500);
            myGLCD.print("            ", CENTER, 192);
            myGLCD.setColor(0, 255, 0);
          }
        }
      }
    }
  }
}

I couldn't get the sketch you posted to do anything but display Button 1 on the TFT screen.
The sketch I posted works for me on both of my SainSmart screens

I tried your code and I'm getting the same issues... No touch registering. I think it's pretty much a hardware issue now. Waiting to hear back from Sainsmart to return the screen and shield and try to get a new one.

Thanks for everyone's help.

Check out UTOUCH Users---READ THIS!!! Add delay after myTouch.dataAvailable() - Displays - Arduino Forum. I had the same problem and had to add a delay after myTouch.dataAvailable().