Piaware LCD

I would love to flip my display 180 degrees as I want the power to come in from the top based on where I have the display physically located.

I tried a lot of different methods and finally came up with one that worked on my pi2 Model B v1.1.

edit /boot/config.txt
and add the rotate option to the dtoverlay command

# configure the LCD
dtparam=spi=on
dtoverlay=waveshare35a:rotate=270

So now my display is flipped so the power connector is at the top as desired.

Now I need to work out how to alter the touchscreen to match. :crazy_face: as the touchscreen is now configured upside down. I will play with editing 98-35tft-calibration.conf

The other methods I tried were using: xrandr (could not open the display, maybe this is needed on a pi4 though); lcd_rotate (I think may work if is is a I2C connected display but mine is SPI)
and some others.

EDIT:

Ok… now the touchscreen.

sudo nano /etc/X11/xorg.conf.d/98-35tft-calibration.conf

and replace the transformation matrix with

Section "InputClass"
        Identifier      "calibration"
        MatchProduct    "ADS7846 Touchscreen"
        MatchLayout     "TFT35"
        Option "Calibration" "219 3835 3984 219"
        Option  "TransformationMatrix" "0 1 0 -1 0 1 0 0 1"
        Option  "CalibrationMatrix" "1.166  0 -0.0835 0 1.145 -0.070 0 0 1"
EndSection

for reference my orginal matrix was

Option "TransformationMatrix" "0 -1 1 1 0 0 0 0 1"

The default flightaware LCD setting seems to be 90 degrees clockwise. I flipped mine to 270 degrees. Maybe other rotations should work although maybe the visuals would be affected as the screen is laid out for a landscape page.

2 Likes