TFT Display Going Crazy

My Sainsmart display is going crazy when I upload my code, there is a bunch of lines going across the screen and all of the icons that are supposed to be there don’t show up. I uploaded an arduino example on it and it works fine so I don’t think its the screen itself. I’ll attach a photo of what my screen looks like and what its supposed to look like. This is the code that I’m using if it helps: https://codebender.cc/sketch:78688

screen.jpg

home.png

Good place to start troubleshooting is to verify that these lines are equal in your example code and in codebender's code.

UTFT myGLCD(SSD1289, 38, 39, 40, 41); // start up an instance of the TFT screen
UTouch myTouch(46, 45, 44, 43, 42); // start up an instance of for touch

TommiP

I got the screen to work but none of the buttons work on the home screen itself.

TommiP:
Good place to start troubleshooting is to verify that these lines are equal in your example code and in codebender's code.

UTFT myGLCD(SSD1289, 38, 39, 40, 41); // start up an instance of the TFT screen

UTouch myTouch(46, 45, 44, 43, 42); // start up an instance of for touch




TommiP

What do you mean when you say to verify that the lines are equal

mbarratt:
What do you mean when you say to verify that the lines are equal

I mean that you should verify that the pins for the tft display are defined correctly in both codes. If another one is working and another one does not, the reason could be that the pins are defined otherwise. Without seeing both of your codes it's difficult to say but I've had similar issues when SPI pins are mixed..

TommiP

The code that i’m using uses pins 42-46 for touch but the arduino shield uses pins 2-6 so I added jumper wires between pins 2-6 and 42-46 and removed the headers for pins 2-6 but it still doesnt work. Ill attach a photo of what the shield looks like.