Go Down

Topic: 3.2 Sainsmart TFT touch issues (Read 18254 times) previous topic - next topic


What would be the best way to debounce the touch interface? Also, i cant seem to find the data sheet.


I am not sure if your issues are the same as mine where, but I bought a sainsmart 3.2" TFT LCD Screen about a month ago and had roughly the same issues, it ending up being that the touch screen was just installed upside down?

So to fix that I now have to subtract the y-axis value I want from 240 to get the correct response...
Kind of annoying, but it still works.  I am really not thrilled with sainsmart to be honest, they have such a wide variety of products that all seem to work, I just don't understand why they can't provide information about how to use them with the products.


Hi nkd5025,

I've got the same kit ... I can't get my start with it. I did do http://henningkarlsen.com UTFT to prove the screen. It was a sine wave and all but sometimes quite noisy. With that great reference for the functions, so I'm not too worried about getting what I want to show up on the screen.

But as time passes, the display gets more and more scattered so when I try the Touch demos, I'm not able to really see anything.

I feel like I'm missing something simple to get going... any ideas on simple sketches that got you started?



I just fought with this display from Sainsmart for abit, found you need the latest librarys.
http://www.henningkarlsen.com/electronics/library.php?id=55 for touch
http://www.henningkarlsen.com/electronics/library.php?id=51 for display

works well.
Id say those 3.2 screens arnt the best for touch, but the display is great. For the price, I can live with the touch not working to great. I'm thinking if I keep all the buttons on the more accurate side, I should be good.


I used the codes supplied to check my screens and they work to a point. the second coding inverts my vertical touch however. how do I change that? do I change the pins around in the code?


Oct 05, 2016, 11:48 pm Last Edit: Oct 06, 2016, 12:03 am by d6stringer
OK well nevermind.
As the rule goes, 30 seconds after you post a question you find the problem...

Weird though.  Adding a delay after myTouch.dataAvailable() of about 50ms fixes the scaling issue.

I think i'm having slightly different issues with my new screen. Sainsmart 3.2" SSD1289 Touch Screen With SD Slot on Arduino MEGA
For whatever reason the libraries they have packaged don't work but individually they do.
The Screen seems great but the touch for whatever reason, appears to be scaling my input down by roughly 25%.

I tried a the simple draw an earlier person had suggested but the same issue persists.
Code: [Select]
#include <UTFT.h>
#include <URTouch.h>

UTFT myGLCD(ITDB32S,38,39,40,41);
URTouch  myTouch(6,5,4,3,2);

void setup()


void loop()
    while (myTouch.dataAvailable() == true)
      myGLCD.drawPixel (myTouch.getX(), myTouch.getY());

I also tried the button test, it only works on buttons 1,2,6,7 as that is the corner where the "scaled" output would be.

Also, I'm a new to this.  This is my first display attempt but I can't find anything yet.


I am having issue with touch as well. When using URTOUCH library or older UTOUCH library, output to com windows shows -1 for both x and y coordinatesl. When I use the Touch_AS_example, the serial output looks fine and touch screen appears to be working perfectly fine.

The lcd I have is TFT_320QVT_9341.  The chip on the back is a XPT2046 driver for touch. i am using a MEGA 2560 to control it.

Any help would be appreciated.

Go Up