BlueWave Studio forum
Touch Offsetting - Printable Version

+- BlueWave Studio forum (https://bluewavestudio.io/community)
+-- Forum: OpenAuto Pro (https://bluewavestudio.io/community/forum-86.html)
+--- Forum: Screen mirroring (https://bluewavestudio.io/community/forum-80.html)
+--- Thread: Touch Offsetting (/thread-1564.html)



Touch Offsetting - The Total Legend - 04-13-2020

I have successfully gotten Screen Mirroring to work with the Raspberry Pi 4 B + 7" Touch Screen with my Samsung Galaxy Note 8 running Android 9. Using this screen, I can navigate the phone, but there are some issues.

First Issue

The area where I touch on the RPi Touch Screen is off by several pixels in the Y-axis (vertical) when in Horizontal mode. In Vertical mode, the X-axis (horizontal) touch is off by a significant margin. I also noticed that this offset is changed depending on where I touch the screen, whether its at the top of the screen (it's off by about 20 pixels) or at the bottom of the screen (it's much closer to my actual touch).

Is there a way to offset the touch input from the screen running the RPi to the phone? I don't see any options to offset where I touched.

Second Issue

There is no way to return back to the OAP home screen without physically unplugging my phone. Can a button be added to the top or bottom of the screen? There is unused screen space that looks like it should have had a button to go back or quit.

Thanks.


RE: Touch Offsetting - popcorn - 04-21-2020

This gets a bit tricky. You need to do all of the calibration in the Pi desktop system and outside of OAP.

So, In OAP, press the power button, and press Exit and Yes.

That will drop you to the Raspberry Pi Desktop that is running in X Windows. There you will need to drop into a shell and install the xinput_calibrator but first you will need to install a bunch of necessary packages. (EDIT: the pi needs to have internet access to install these packages, so maybe setup a hotspot with your phone and connect the Pi's wifi to it)

Have a look at this article, it details what you need to do to calibration your touchscreen.
https://www.thingsconnected.io/raspberry-pi-7-inch-touch-screen-calibration/

Once you run the calibrator, you will be promoted to touch the calibration marks in each part of the screen. It will then generate a configuration for you which you will need to copy and paste and put into a config file. And it needs to be entered exactly as it is printed.

The easiest way to do this would be to install the VNC service with raspi-config and then connect it to the same Wifi as the Pi with the hotspot of your phone, and then use a laptop to mirror the display of your Pi so you can copy and paste the configuration in. Because entering it in using the onscreen keyboard is going to be not fun.

Good luck.


RE: Touch Offsetting - jennmike2 - 04-21-2020

(04-21-2020, 11:19 AM)popcorn Wrote: This gets a bit tricky.  You need to do all of the calibration in the Pi desktop system and outside of OAP.

So, In OAP, press the power button, and press Exit and Yes. 

That will drop you to the Raspberry Pi Desktop that is running in X Windows.  There you will need to drop into a shell and install the xinput_calibrator but first you will need to install a bunch of necessary packages. (EDIT: the pi needs to have internet access to install these packages, so maybe setup a hotspot with your phone and connect the Pi's wifi to it)

Have a look at this article, it details what you need to do to calibration your touchscreen.
https://www.thingsconnected.io/raspberry-pi-7-inch-touch-screen-calibration/

Once you run the calibrator, you will be promoted to touch the calibration marks in each part of the screen.  It will then generate a configuration for you which you will need to copy and paste and put into a config file.  And it needs to be entered exactly as it is printed. 

The easiest way to do this would be to install the VNC service with raspi-config and then connect it to the same Wifi as the Pi with the hotspot of your phone, and then use a laptop to mirror the display of your Pi so you can copy and paste the configuration in.  Because entering it in using the onscreen keyboard is going to be not fun.

Good luck.


Or you can plug in a usb keyboard with a touch pad. Easier then VNC I think.


RE: Touch Offsetting - popcorn - 04-21-2020

Also, if you have an issue where the config file doesn't seem to be taking effect, have a look at this answer. This helped me configure my touchscreen.

https://raspberrypi.stackexchange.com/a/91319