Touch Display

Date: 2019-08-22 15:17:06

<<Previous | TOC | Next>>

I bough the 7" touch display for the Raspberry Pi quite a while ago, with the intension of putting it on my robot controller. I decided ChessLR would be the better use for it. I am using it in portrait mode, which required a few configuration changes.

First change was to add display_rotate=1 to the /boot/config.txt:

# For more options and information see
# Some settings may impact device functionality. See link above for details

# screen rotation

# uncomment if you get no picture on HDMI for a default "safe" mode

Other values for rotate are:

0   no rotation
1   rotate 90 degrees clockwise
2   rotate 180 degrees clockwise
3   rotate 270 degrees clockwise

This only rotates the display. It doesn't effect the touch input. So you also need to run the following xinput commands. I put them into a shell script to make it easier to automate the process in the next step. I put the script in /home/pi/bin/

xinput set-prop 'FT5406 memory based driver' 'Evdev Axes Swap' 1
xinput --set-prop 'FT5406 memory based driver' 'Evdev Axis Inversion' 0 1

And lastly, to execute the script automatically when X starts, I created the following file .config/autostart/.desktop:

[Desktop Entry]
Name=Startup Script

YouTube video

Chess set on

Copyright © 2020, Lee Patterson