Touch Rotation with 10″ Display from Joy-IT
I got myself a 10″ multi-touch display from Joy-IT for my Raspberry. I’m quite satified with the display, it has a relatively high resolution, very good display quality, good viewing angle, and touch works very well – the necessary driver is included in Raspbian. Two things that could be better: The backlight is not software-controllable, and the position of the HDMI and USB connectors is not optimal.
In the end I want to use the display mounted vertically in a wall, so I included the line
1 |
display_rotate=3 |
into /boot/config.txt. Unfortunately this only rotates the display, not the touch input, so the mouse is not following the touch. The line lcd_rotate=3, which would turn both display and touch, only works for the official Raspberry Foundation display. The methods described in my 3.2″ Touch Display Quick Guide do not work with this screen either. First, because tslib does not know how to handle the multitouch, and second: the SwapAxes line is also not recognised.
Still, /usr/share/X11/xorg.conf.d/99-calibration.conf is the key to success:
1 2 3 4 5 |
Section "InputClass" Identifier "calibration" MatchProduct "BYZHYYZHY By ZH851" Option "TransformationMatrix" "0 -1 1 1 0 0 0 0 1" EndSection |
That does the trick, also on brand-new Raspbian Stretch. For more details on the transformatin matrix, also for other rotations, go here.
3.2″ Touch Display Quick Guide
The Waveshare/Joy-IT 3.2″ touch display for Raspberry Pi is well suited for embedded applications that require a dynamic but small user interface. This article describes the steps required to get it working with Jessie, X and Python.