In this lesson we are going to learn how to change the display orientation of a Raspberry Pi LCD screen. Note that the following way will only work if you are using waveshare display driver.
Interfacing and Driver InstallationFor instructions about interfacing and installing the driver go to this link
https://www.hackster.io/najad/interfacing-display-with-raspberry-pi-121a94
- Open a terminal window, either you can directly open from your raspberry pi or you can use ssh.
- Type
cd lcd-show
to enter inside the downloaded driver folder, which we have done in the previous lesson. - Now type the below-provided code for whichever the orientation you need,
For 2.8inch RPi LCD (A)
sudo ./LCD28-show X
- X should be 0, 90, 180 or 270
For 3.2inch RPi LCD (B)
sudo ./LCD32-show X
- X should be 0, 90, 180 or 270
For 3.5inch RPi LCD (A)
sudo ./LCD35-show X
- X should be 0, 90, 180 or 270
For 3.5inch RPi LCD (B)
sudo ./LCD35-show X
- X should be 0, 90, 180 or 270
For 35inch RPi LCD (B) V2
sudo ./LCD32B-show-V2 X
- X should be 0, 90, 180 or 270
For 3.5inch RPi LCD (C)
sudo ./LCD35-show X
- X should be 0, 90, 180 or 270
For 4inch RPi LCD (A)
sudo ./LCD4-show X
- X should be 0, 90, 180 or 270
Read in my blog: https://www.diyusthad.com/2019/04/getting-started-with-raspberry-pi-spi.html
Comments