9 years, 7 months ago.

Does the Seeed_TFT_Touch_Shield software support the touchscreen?

I'm new to mbed so I may not be looking in the right place, but I can't seem to find how to get the touchscreen x, y, and z values for a Seeed 2.8" TFT Touch V2 display running on a ST Nucleo F411RE board using the Seeed_TFT_Touch_Shield software.

Does this Seeed_TFT_Touch_Shield software support the touchscreen?

Question relating to:

Affordable and flexible platform to ease prototyping using a STM32F411RET6 microcontroller.

Hi david, I got that working: <code> point p ; bool Touch = TFT.getPixel(p); if (Touch) { pc.printf("1> Touch %3d %3d\r\n", p.x, p.y); } You may have to play with the default touch calibration:

default touch calibration orientation 0 0 1 2 3 x_off = 17252; 17252 16605 108755 108000 y_off = 22330; 22330 105819 97167 22000 pp_tx = 261; 378 289 -390 -291 pp_ty = 378; 261 -355 -239 356 pp_tx = 378; 378 289 -390 -291 pp_ty = 261; 261 -355 -239 356 orientation 1 0 1 2 3 x_off = 16605; 17252 16605 108755 108000 y_off = 105819; 22330 105819 97167 22000 pp_tx = 289; 378 289 -390 -291 pp_ty = -355; 261 -355 -239 356 orientation 2 0 1 2 3 x_off = 108755; 17252 16605 108755 108000 y_off = 97167; 22330 105819 97167 22000 pp_tx = -390; 378 289 -390 -291 pp_ty = -239; 261 -355 -239 356 orientation 3 0 1 2 3 x_off = 108000; 17252 16605 108755 108000 y_off = 22000; 22330 105819 97167 22000 pp_tx = -291; 378 289 -390 -291 pp_ty = 356; 261 -355 -239 356 </code> I'm sorry, I can't get this readable posted.

posted by Jack Berkhout 09 Feb 2015

1 Answer

9 years, 7 months ago.

It seems that the library (http://mbed.org/teams/components/code/SeeedStudioTFTv2/) supports the touchscreen.

/** read x and y coord on screen
 *
 * @returns point(x,y)
 */
bool getPixel(point& p);

Hope it helps,

Romain

Accepted Answer