user3740961
user3740961

Reputation: 329

Raspberry Pi 7 inch Touchscreen rotate

I have a small problem: I would like using Raspberry PI 7 inch LCD on portrait (standing) mode. (Kivy application) I added on /boot/config.txt: lcd_rotate=2 and display_rotate=1 The display is OK, but touch screen not good! The touch not rotating 90 degrees. How I rotate touch screen 90 degrees?

Upvotes: 1

Views: 4053

Answers (1)

Leo
Leo

Reputation: 115

Rotate official 7" Raspberry Touchscreen

1.install xinput:

sudo apt-get install xinput

2.to rotate the screen, edit this file:

sudo nano /boot/config.txt

and add this line at the end:

display_rotate=1

for the other direction, you can use:

display_rotate=3

exit(CTRL+X) and save.

3.create a script for flipping touchscreen every time raspbian boots:

sudo nano /home/pi/Desktop/fliptouch.sh

add this line:

xinput --set-prop 'FT5406 memory based driver' 'Coordinate Transformation Matrix' 0 1 0 -1 0 1 0 0 1

exit(CTRL+X) and save.

4.chmod this script:

sudo chmod 777 /home/pi/Desktop/fliptouch.sh

5.to launch the script with the session, edit this file:

sudo nano ~/.config/lxsession/LXDE-pi/autostart

add this line at the end:

@/home/pi/Desktop/fliptouch.sh

exit(CTRL+X) and save.

6.Reboot:

sudo reboot

source: https://www.raspberrypi.org/forums/viewtopic.php?f=108&t=120793&start=50#p1084567

Upvotes: 1

Related Questions