Configurando Touch Screen eGalax no Raspberry Linux

13 de outubro de 2020 Off Por Marcelo Martins

Irei mostrar como configurar o touch screen eGalax no Linux Raspian.

Ciglow Raspberry Pi Screen,9 Inch LCD Display HDMI Monitor Touchscreen Module HDMI + VGA + 2AV TFT LCD Touch Screen with Driver Board for Raspberry Pi. - LCD Displays
Modelo de tela com touch screen configurado.
TOUCHSCREEN-CONTROLLER (ETP-4500UG-B, V2.19, 4-wire resistive, EETI/EGALAX) with 45cm USB cable
Controlador EETI/EGALAX

Procedimento de configuração Linux

Instalação dos driver do linux

 sudo apt-get install xserver-xorg-input-evdev 

Vá na pasta /usr/share/X11/xorg.conf.d/ edite o arquivo 40-libinput.conf

Conforme pode ver a seguir

Match on all types of devices but tablet devices and joysticks
Section "InputClass"
Identifier "evdev pointer catchall"
#Identifier "libinput pointer catchall"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
#Driver "libinput"
Driver "evdev"
EndSection

Perceba que os # são comentários.

Agora vá na pasta /usr/share/X11/xorg.conf.d, editando o arquivo 99-calibration.conf

Section "InputClass"
Identifier "evdev touchscreen catchall"
MatchProduct "eGalax Inc. USB TouchController"
Driver "evdev"
Option "SwapAxes" "0"
Option "Calibration" "1990 101 1846 102"
EndSection

Lembre-se os valores do Calibration voce pode obter através do aplicativo xinput_calibrator.

Toque na tela para ele perceber os pontos de calibração

Ele mostrara algo como descrito abaixo:

Calibrating EVDEV driver for "eGalax Inc. USB TouchController" id=6
current calibration values (from XInput): min_x=1990, max_x=101 and min_y=1846, max_y=102
Doing dynamic recalibration:
Setting new calibration data: 1965, 98, 1848, 59
--> Making the calibration permanent <--
copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf'
Section "InputClass"
Identifier "calibration"
MatchProduct "eGalax Inc. USB TouchController"
Option "Calibration" "1965 98 1848 59"
EndSection

Dê reboot na aplicação e verá que sua tela esta configurada com sucesso

Demonstração de configuração de touch screen.