====== Calibrating the Touch Screen ======
===== GUI (Bookworm) =====
The ComfilePi Bookworm OS now contains a GUI application available from the //ComfilePi// menu that you can use to start the touchscreen calibration program from the desktop.
{{ :comfilepi:calibrating_the_touch_screen:touch_calibration_gui.png }}
===== Command Line Interface (All OS Variants) =====
To calibrate the ComfilePi's touchscreen, simply run the following command from the ComfilePi's desktop.
sudo /opt/ComfileTech/touch/rpi-AR1100/AR1100 -c 4
This will display a sequence of 4 crosshairs that need to be accurately touched to perform the calibration. After the calibration, the mouse device will be re-enumerated, so the touch-beep may no longer sound when the screen is touched. To remedy that, either reboot the ComfilePi, or restart the touch-beep service with the following command:
sudo systemctl restart touch-beep.service
{{ :comfilepi:calibrating_the_touch_screen:touch_calibration.mp4?800x450 |}}
If the touchscreen no longer works after calibrating, please try running the following command to force it to re-enumerate in mouse mode, and then reboot.
sudo /opt/ComfileTech/touch/rpi-AR1100/AR1100 -m
===== Kivy =====
It has been reported to us that to achieve accurate touch events in Kivy the following lines may need to be added to the ''[input]'' section of the ///home/pi/.kivy/config.ini// file.
mouse = mouse
mtdev_%(name)s = probesysfs,provider=mtdev
hid_%(name)s = probesysfs,provider=hidinput
[[https://www.instructables.com/Resistive-Touch-Screen-on-Raspberry-Pi/|Reference]]
[[comfilepi:index|ComfilePi - Industrial Raspberry Pi Panel PC]]