3

On a pi B with raspbian-stretch, I have tried every tip I could find to get the touch screen to rotate 180 degrees: commands in config.txt, new drivers, using ./LCD-show 180, and more. Nothing works except modifying the config command to Dtoverlay=tft35a:rotate=270.

However the touch functionality doesn't rotate along with the display.

Can anybody offer me a solution or, worst case, suggest a case that incorporates the display with the usb and ethernet ports on the right? I bought the very nice Astroprint case that puts the screen at a 45 degree angle.

0

Add to config.txt:

lcd_rotate=3

This is presuming the LCD is attached by DSI ribbon cable. That should also rotate the touch coordinates too. 1 = 90° 2 = 180° 3 = 270°

https://www.raspberrypi.org/forums/viewtopic.php?t=166959

  • The display sits right on the GPIO connector, so this doesn't work. Thanks anyway. – Andy F May 27 '18 at 13:20
0

I think the touch part of the screen behaves as a different part (a input device) on top ot the display's output device. So you have currently just rotate the latter not the input

This suggest a similar concept - except the screen is rotated by adding this to /boot/cmdline.txt (you may be able to stick with your existing rotation command, in which case some of these options may need to be different!):

fbtft_device.rotate=X 

To actually change the touchscreen orientation, try changing swap_xy=0 to swap_xy=1 in /etc/modules (on the ads7846_device line).

Then follow by running sudo apt-get -y install xinput evtest, and adding this line:

DISPLAY=:0 xinput --set-prop 'ADS7846 Touchscreen' 'Evdev Axis Inversion' 1 0

before the . /etc/X11/Xsession line in /etc/X11/xinit/xinitrc, and rebooting.

Again, you will lily require different parameters (it also suggests 0 1 at the end of the DISPLAY line).

These devices are general purposes when you have got the rotation working, it should help to calibrate the touch-screen as well! - this is also detailed in that article.

  • Thanks and I read the article. Unfortunately the screen doesn't rotate, and there is no ADS line in 'modules' to change. There is only a single unrelated parameter. – Andy F May 27 '18 at 13:32
  • @AndyF (probably should of checked this in the first place, it usually helps to provide this...) what system image and touchscreen model & version are you using? – Wilf May 27 '18 at 18:26
  • Using Raspbian-stretch, Kumantech 3.5", RPI version. Supposedly, I need to re-calibrate the touch and modify /etc/X11/xorg.conf.d/99-calibration.conf with the coordinates, but that doesn't seem to work. – Andy F May 28 '18 at 19:33

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.