Last active
February 22, 2017 17:12
-
-
Save Galarzaa90/3281f798b2c2e8312ff3b402397967fa to your computer and use it in GitHub Desktop.
Script to rotate the touch screen driver on Raspberry Pi official touchscreen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#script to set correct touchscreen orientation after x start | |
#this won't rotate the displayed image, only the touchscreen input | |
#to rotate the displayed image add the following to /boot/config.txt | |
#"display_rotate=1" to rotate display 90 degrees | |
#"display_rotate=3" to rotate display 270 degrees | |
# To execute this script on boot, add the following line: | |
#@/path/to/file/screenflip.sh | |
#to (Wheezy): | |
#/etc/xdg/lxsession/LXDE-pi/autostart | |
#to (Jessie): | |
#~/.config/lxsession/LXDE-pi/autostart | |
xinput set-prop 'FT5406 memory based driver' 'Evdev Axes Swap' 1 | |
#Uncomment this for 90 rotation | |
xinput --set-prop 'FT5406 memory based driver' 'Evdev Axis Inversion' 0 1 | |
#Uncomment this for 270 rotation | |
#xinput --set-prop 'FT5406 memory based driver' 'Evdev Axis Inversion' 1 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment