TFT Touch and Rotation

I'm using a keyboard_v2 example from Makerfabs for the ESP32-S3-SPI-TFT (with Touch) and it works fine in portrait including the touch...

When I set the display to landscape in config, and edited the code for button size and layout in landscape everything draws perfectly buy my touch doesn't return the correct position data...

The touch returned data appears to be base on portrait mode, is there a config setting to rotate the touch sensor?

Not an Arduino IDE issue, it works perfectly but someone might have an idea...
Mike

Not that I see..
Probably going to have to do the math..
Kind of remember having to do this before..
Look at TouchArea, ESP Touch..

good luck.. ~q

Appreciate the feedback, will check it out.
Don't believe it's not possible to set some config to fix this... Looks like I need to revert to portrait and rotate button text... back to the drawing board...
Mike

I haven't found one. What I had to do was offset the (x,y) values returned from getxy() when I rotated the display. It's easy enough to do.

I'm using TFT_eSPI and in Touch.h I just noticed this

//#define TOUCH_SWAP_XY

Suggests that it may do what you need and maybe I didn't have to write code for it! I'll try it someday.

I'm also using TFT_eSPI, for the user setup I use Makerfabs_Capacitive_Touch_User_Setup.h as my project uses the MaTouch_ESP32-S3 SPI. Basically the demo program is touch_keyboard_v2.ino from the examples modified to suit...

Will give it another fed days of searching, but if all else fails, I stick to portrait mode (but I won't be happy) :wink:

Mike

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.