Hi everyone,
I’m coming across a challenge with the correct settings to align the screen orientation with the touch orientation.
I’ve created a simple project in SLS with 240w x 320h – no rotation.
I’ve exported to Arduino IDE.
Double checked the width and height parameters in ui. code.
Set the orientation code to == 0.
The screen is reacting to touch just fine yet the touch portion I believe thinks the screen is in landscape orientation, not portrait.
Could this be a setting within this code?
/*Read the touchpad*/
void my_touchpad_read( lv_indev_drv_t * indev_driver, lv_indev_data_t * data )
{
**uint16_t touchX = 0, touchY = 0;**
//bool touched = false;//tft.getTouch( &touchX, &touchY, 600 );
bool touched = tft.getTouch( &touchX, &touchY, 600 );
and/or:
/*Change to your screen resolution*/
static const uint16_t screenWidth = 240;
static const uint16_t screenHeight = 320;
Thank you!