I have recently bought a Hyperpixel 4.0 from pimoroni for my raspberry pi.
I have also made a Pygame interface with the aim of using the touch screen as the input device.
This works perfectly when I am in the desktop interface, even when the window is full screen.
However, I don't want to run it in the desktop, I want it to run in the terminal (no startx)
When I do this, the mouse calibration is not correct and makes it unusable.
I have tried several methods including forcing Pygame to detect the touch screen to no avail. It either works, it the mouse goes crazy.
Can anyone help here? I can't find much online.
Thanks!
The problem is that the Raspbian window system calibrates the Hyperpixel touch locations, but pygame directly accesses the touch device but is not calibrated.
My solution was to use a desktop application in full screen mode.
I tried doing a matrix based calibration of my own, but it appears that the behavior is nonlinear.
Raspberry Pi Pygame touch screen issues