tft touch screen samples.

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
rajeetharan
 
Posts: 35
Joined: Sat Aug 03, 2013 3:51 pm

tft touch screen samples.

Post by rajeetharan »

dear
im using Adafruit 2.8" TFT Touchscreen.

i need to work with touch screen like user interface ( like an ATM machine interface ).
there is only paint and touch screen projects are there.

where can i find any basic sample codes for this ?

User avatar
Franklin97355
 
Posts: 23938
Joined: Mon Apr 21, 2008 2:33 pm

Re: tft touch screen samples.

Post by Franklin97355 »

where can i find any basic sample codes for this ?
Could you be more specific as to what you want the screen to do?
Does the example code show you how to write and read the screen?

rajeetharan
 
Posts: 35
Joined: Sat Aug 03, 2013 3:51 pm

Re: tft touch screen samples.

Post by rajeetharan »

1) i want to run a function when touched in particular rectangle space ( like button press ).


int h1=280;
int w1=40;

int h2=200;
int w2=100;

tft.drawRect(tft.width() -w1 , tft.height() -h1, 40 , 25, RED);
tft.drawRect(tft.width() -w2 , tft.height() -h2, 40 , 30, BLUE);



2) sleep the screen if didnt detect any touch for sime time.

User avatar
Franklin97355
 
Posts: 23938
Joined: Mon Apr 21, 2008 2:33 pm

Re: tft touch screen samples.

Post by Franklin97355 »

Here are the library and examples for the touch screen https://github.com/adafruit/Touch-Screen-Library

rajeetharan
 
Posts: 35
Joined: Sat Aug 03, 2013 3:51 pm

Re: tft touch screen samples.

Post by rajeetharan »

dear
honestly i tried that before posting this.
i couldn't find exact one.

which one is used for that purpose ?

User avatar
Franklin97355
 
Posts: 23938
Joined: Mon Apr 21, 2008 2:33 pm

Re: tft touch screen samples.

Post by Franklin97355 »

There is probably not one that does exactly what you want. You need to try things out until you understand how they work and then write your own.

User avatar
dmkmedia
 
Posts: 80
Joined: Thu Jun 11, 2015 2:34 pm

Re: tft touch screen samples.

Post by dmkmedia »

did u every get the answer ur looking for as i also need buttons with actions on a touch

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”