Can I get sample code for STMPE610 in C language?

Post test messages here

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
vishal mane
 
Posts: 3
Joined: Tue Mar 11, 2014 6:07 am

Can I get sample code for STMPE610 in C language?

Post by vishal mane »

hi,
I have purchased ADAFRUIT's touch screen controller STMPE610
Is there any code available for touch screen controller STMPE610 in c language
If available please reply
Thank you

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Can I get sample code for STMPE610 in C language?

Post by adafruit_support_rick »

All we have is the library code, which is C++. However, it is very close to C, and it should be easy to make the necessary changes.

User avatar
vishal mane
 
Posts: 3
Joined: Tue Mar 11, 2014 6:07 am

Re: Can I get sample code for STMPE610 in C language?

Post by vishal mane »

Hi,
The code provided by you for stmpe610 worked and I displayed the readings on hyper terminal.But the problem is that for the first touch it shows a set of readings but when I touch at another position last reading of the previous touch get repeated even though there is a large difference between the touch positions.Similarly for the third touch the values of the second touch get repeated ;

EG:
FIRST TOUCH
0166 2103
0166 2103
0166 2103
0166 2103
0166 2103

SECOND TOUCH
0166 2103
0166 2103
0180 2201
0180 2201
0180 2201
0180 2201

THIRD TOUCH
0180 2201
0180 2201
0450 3502
0450 3502
0450 3502
0450 3502
0450 3502

PLEASE REPLY

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Can I get sample code for STMPE610 in C language?

Post by adafruit_support_rick »

How long are you waiting between touches?
Are you certain your code doesn't buffer up a couple of touches so that they aren't transmitted until the next touch occurs.
The STMPE does not do this when used with our code on an Arduino.

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

Re: Can I get sample code for STMPE610 in C language?

Post by Franklin97355 »

You may need to flush the buffer after a read to allow the fresh data to register. Without the code and a screen that is the best I can come up with.

User avatar
vishal mane
 
Posts: 3
Joined: Tue Mar 11, 2014 6:07 am

Re: Can I get sample code for STMPE610 in C language?

Post by vishal mane »

I tried the code for SPI,it worked .Can I get a similar code for i2c .I am using LPC2378 controller.
PLEASE REPLY.
THANK YOU

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Can I get sample code for STMPE610 in C language?

Post by adafruit_support_rick »

We don't have any I2C code for the STMPE610

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

Return to “Test Message Forum (closed)”