Skip to content

Instantly share code, notes, and snippets.

@johnoscott
Created April 16, 2018 02:18
Show Gist options
  • Save johnoscott/3cd564a919f4853109a1fb7f3c0ea991 to your computer and use it in GitHub Desktop.
Save johnoscott/3cd564a919f4853109a1fb7f3c0ea991 to your computer and use it in GitHub Desktop.
[Rotate Raspberry Pi Display from Terminal] #raspberry-pi
INSTALLATION
We've created a one-liner that automates the installation procedure. To get started with this display, simply execute curl -L http://coreelec.io/2q | bash
If you want to see what this script does before running, save it to a file with curl -L http://coreelec.io/2q >> lcd35-installer
You can roll back to using the regular HDMI output at any time by executing the included LCD_hdmi script.
https://core-electronics.com.au/3-5inch-display-module-touch-lcd-with-stylus-for-raspberry-pi-3.html
To rotate your display, simply enter display_rotate or lcd_rotate at the bottom of your config file:
#rotate 0 degrees
display_rotate=0
#rotate 90 degrees clockwise
display_rotate=1
#rotate 180 degrees
display_rotate=2
#rotate 270 degrees
display_rotate=3
You can also flip your display by adding the following:
#flips the display vertically
display_rotate=0x20000
#flips the display horizontally
display_rotate=0x10000
Once you've made those changes, hit Ctrl+X and then Y to save, and you’ll need to reboot in order for any of those changes to take effect, so just use:
sudo reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment