# TFT Display Going Crazy

**URL:** <https://forum.arduino.cc/t/tft-display-going-crazy/382306>\
**Category:** Displays\
**Created:** [April 26, 2016, 8:01pm UTC](https://forum.arduino.cc/t/tft-display-going-crazy/382306 "2016-04-26T20:01:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbarratt](https://avatars.discourse-cdn.com/v4/letter/m/df788c/32.png) [@mbarratt](https://forum.arduino.cc/u/mbarratt)\
**Post date:** [April 26, 2016, 8:01pm UTC](https://forum.arduino.cc/t/tft-display-going-crazy/382306/1 "2016-04-26T20:01:17Z")

</div>

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: [IAqua copy by fietsenrex](https://codebender.cc/sketch:78688)

![screen.jpg](https://europe1.discourse-cdn.com/arduino/original/4X/1/e/6/1e685909e493a40b54704d85a47d4e2ce2363367.jpeg)

![home.png](https://europe1.discourse-cdn.com/arduino/original/4X/6/c/6/6c63e24aaaead8ceaaa55425bf461508bdf005bc.png)

---

<div class="post-metadata">

**Author:** ![TommiP](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@TommiP](https://forum.arduino.cc/u/TommiP)\
**Post date:** [April 27, 2016, 12:07pm UTC](https://forum.arduino.cc/t/tft-display-going-crazy/382306/2 "2016-04-27T12:07:00Z")

</div>

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

```cpp
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

---

<div class="post-metadata">

**Author:** ![mbarratt](https://avatars.discourse-cdn.com/v4/letter/m/df788c/32.png) [@mbarratt](https://forum.arduino.cc/u/mbarratt)\
**Post date:** [April 27, 2016, 7:46pm UTC](https://forum.arduino.cc/t/tft-display-going-crazy/382306/3 "2016-04-27T19:46:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mbarratt](https://avatars.discourse-cdn.com/v4/letter/m/df788c/32.png) [@mbarratt](https://forum.arduino.cc/u/mbarratt)\
**Post date:** [April 28, 2016, 1:08am UTC](https://forum.arduino.cc/t/tft-display-going-crazy/382306/4 "2016-04-28T01:08:45Z")

</div>

> TommiP:  
> Good place to start troubleshooting is to verify that these lines are equal in your example code and in codebender's code.
> 
> ```arduino
> 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

> ```arduino
> 
> TommiP
> 
> ```

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

---

<div class="post-metadata">

**Author:** ![TommiP](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@TommiP](https://forum.arduino.cc/u/TommiP)\
**Post date:** [April 28, 2016, 3:36am UTC](https://forum.arduino.cc/t/tft-display-going-crazy/382306/5 "2016-04-28T03:36:47Z")

</div>

> 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

---

<div class="post-metadata">

**Author:** ![mbarratt](https://avatars.discourse-cdn.com/v4/letter/m/df788c/32.png) [@mbarratt](https://forum.arduino.cc/u/mbarratt)\
**Post date:** [April 28, 2016, 5:25pm UTC](https://forum.arduino.cc/t/tft-display-going-crazy/382306/6 "2016-04-28T17:25:22Z")

</div>

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.

 ![D7K_0912.jpg](https://europe1.discourse-cdn.com/arduino/original/4X/6/7/d/67d2af8ae6d1ad5f560363239e9b03908bc1046d.jpeg)

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 6, 2021, 3:43am UTC](https://forum.arduino.cc/t/tft-display-going-crazy/382306/7 "2021-05-06T03:43:58Z")

</div>


