Configurando Touch Screen eGalax no Raspberry Linux
13 de outubro de 2020Irei 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](https://cdn.shopify.com/s/files/1/2523/5770/products/513bya0LvZL_700x700.jpg?v=1589330641)
![TOUCHSCREEN-CONTROLLER (ETP-4500UG-B, V2.19, 4-wire resistive, EETI/EGALAX) with 45cm USB cable](https://www.cartft.com/image_db/ETP-4500UG-B_V2_19_45cm.jpg)
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.
![](http://maurinsoft.com.br/wp-content/uploads/2020/10/image.png)
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