I'm using waveshare 5 inch HDMI touchscreen on my raspberry pi , I need a python code to determine the X,Y coordinates of touched point. Do you have any idea ?
Your touchscreen works just as every other screen. I suppose you also had to connect an USB cable to your Pi. This acts just like a normal mouse. When you touch your screen, that virtual mouse moves to that point and makes a click there.
You can get the position of the mouse with pyautogui The following code prints the mouse position:
import pyautogui print(pyautogui.position())
I hope that helps, otherwise clarify your question or write a comment