In some of ILI9341 LCD shields for Arduino, the content is mirrored. To fix this problem you should go to the LCDWIKI_KBV.cpp file in the line 845 and modify the code according to this:
From
switch (rotation)
{
case 0:
val = ILI9341_MADCTL_MX | ILI9341_MADCTL_BGR; //0 degree
break;
case 1:
val = ILI9341_MADCTL_MV | ILI9341_MADCTL_BGR; //90 degree
break;
case 2:
val = ILI9341_MADCTL_MY | ILI9341_MADCTL_ML |ILI9341_MADCTL_BGR; //180 degree
break;
case 3:
val = ILI9341_MADCTL_MX | ILI9341_MADCTL_MY| ILI9341_MADCTL_ML | ILI9341_MADCTL_MV | ILI9341_MADCTL_BGR; //270 degree
break;
}
To
switch (rotation)
{
case 0:
val = ILI9341_MADCTL_ML | ILI9341_MADCTL_BGR; //0 degree
break;
case 1:
val = ILI9341_MADCTL_MY|ILI9341_MADCTL_MV | ILI9341_MADCTL_BGR; //90 degree
break;
case 2:
val = ILI9341_MADCTL_MY|ILI9341_MADCTL_MX|ILI9341_MADCTL_MH|ILI9341_MADCTL_BGR; //180 degree
break;
case 3:
val = ILI9341_MADCTL_MX | ILI9341_MADCTL_MV | ILI9341_MADCTL_BGR; //270 degree
break;
}
Hi
In some of ILI9341 LCD shields for Arduino, the content is mirrored. To fix this problem you should go to the LCDWIKI_KBV.cpp file in the line 845 and modify the code according to this: From
To