After I fix trouble with mirrored screen I get inverted touch...

I am making modification to original sketch to work with MCUFRIEND screen, this project is a thermostat with some set point, so the screen is used to set the temperature and humidity. I managed to fix an initial problem of mirrored display by using tft.SetRotation(2) . But because I am using TouchScreen, now I get inverted touch! I would think that the solution is to Map () my touch but I don’t know or change the calibration. I kind of tried that, but no success, I am not sure where I should change the calibration. I don’t get error messages but it continues inverted all the time. Any better way to get rid of mirrored screen without inverting touchscreen???

TWORKinvertedNumber.ino (16.8 KB)


Your INO file is confused. You do not use MCUFRIEND_kbv include or MCUFRIEND_kbv object.

TouchScreen_kbv ts(XP, YP, XM, YM, 200);   //re-initialised after diagnose
TSPoint_kbv tp;

If you want to port a working example from another library, please give a link to the original working code.

I can show you how to adapt it for your ILI9486 320x480 display and MCUFRIEND_kbv.

If you post the Touchscreen_Calibr_native.ino report, I can show you how to map the Touchscreen to your PORTRAIT_REV or LANDSCAPE application.