본문 바로가기

이것저것 배운것/라즈베리파이

waveshare 3.2inch tft-lcd setup - TFT-LCD 사용하기

waveshare 3.2inch tft-lcd setup - LCD에 Xwindow 띄우기

위 글을 통해 TFT-LCD를 이용 할 수 있었다.


허나, 터치가 빠졌다!


고로 이번글은 터치를 살리는(?)법을 씀.


터치스크린 입력이 LCD화면과 일치하도록 하려면 캘리브레이션 과정을 수행해야 함.



X-Windows 터치 캘리브레이션 과정


1. Install

cd /tmp
wget http://tronnes.org/downloads/xinput-calibrator_0.7.5-1_armhf.deb
sudo dpkg -i -B xinput-calibrator_0.7.5-1_armhf.deb
rm xinput-calibrator_0.7.5-1_armhf.deb

2. Configure xinput-calibrator to autostart with X-Windows

sudo wget -O /etc/X11/Xsession.d/xinput_calibrator_pointercal https://raw.github.com/tias/xinput_calibrator/master/scripts/xinput_calibrator_pointercal.sh
echo "sudo /bin/sh /etc/X11/Xsession.d/xinput_calibrator_pointercal" | sudo tee -a /etc/xdg/lxsession/LXDE-pi/autostart

3. Touch Panel Ratation

/etc/X11/xorg.conf.d/99-ads7846-cal.conf

Section "InputClass"
        Identifier      "calibration"
        MatchProduct    "ADS7846 Touchscreen"
        Option  "SwapAxes"      "1"
EndSection


다른 자세한 사항은 FBTFT on Raspian << 에서 확인할 것.



캘리브레이션 작업을 새로 하고자 하는경우

/etc/pointercal.xinput

를 지우고 다시 x-windows를 띄우면 된다.


ps. 위 내용은 waveshare 3.2inch TFT-LCD(V3)를 이용한 것이므로 잘 확인후 사용할 것.