Arduino-FT6336U icon indicating copy to clipboard operation
Arduino-FT6336U copied to clipboard

How to rotate the touch screen ? No function exists

Open pistojim opened this issue 1 year ago • 2 comments

Resistive touch screen XPT2026 has a function touch.setRotation(1); How can we do the same with capacitive FT6336U ?

pistojim avatar Oct 17 '23 23:10 pistojim

For the moment I solve it like that :

// X_Coord = tp.tp[0].x; // no flip // Y_Coord = tp.tp[0].y; // no flip

X_Coord = tp.tp[0].y;    // X <-> Y flip
Y_Coord = tp.tp[0].x;    // X <-> Y flip

X_Coord = 320 - X_Coord;   //180 degrees flip X axis
//Y_Coord = 240 - Y_Coord;  //180 degrees flip Y axis

pistojim avatar Oct 17 '23 23:10 pistojim

This library does not provide setRotaion function. So you need to calculate rotation by yourself

asasaki-shiftall avatar Oct 18 '23 15:10 asasaki-shiftall