Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
en:c1_tft_touch [2015/05/22 13:03] odroid [Test your Touchscreen] |
en:c1_tft_touch [2017/07/26 15:53] john1117 [Test your Touchscreen] |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ==== Test your Touchscreen ==== | ||
+ | Create a new udev file | ||
+ | sudo vi /etc/udev/rules.d/95-ads7846.rules | ||
+ | |||
+ | and then, add this lines and save it\\ | ||
+ | SUBSYSTEM=="input", ATTRS{name}=="ADS7846 Touchscreen", ENV{DEVNAME}=="*event*", SYMLINK+="input/touchscreen" | ||
+ | |||
+ | Load SPI and TS drivers. | ||
+ | sudo modprobe spicc | ||
+ | sudo modprobe -r ads7846 | ||
+ | sudo modprobe ads7846 | ||
+ | |||
+ | Now you can see this node. | ||
+ | ls /dev/input/touchscreen | ||
+ | <wrap hide> | ||
+ | Install the event test and touchscreen library | ||
+ | sudo apt-get install evtest libts-bin | ||
+ | </wrap> | ||
+ | Install the event test and touchscreen library | ||
+ | sudo apt-get install evtest | ||
+ | Now you can use some tools such as sudo evtest /dev/input/touchscreen which will let you see touchscreen events in real time, press on the touchscreen to see the reports. | ||
+ | sudo evtest /dev/input/touchscreen | ||
+ | ==== TSLIB Calibration ==== | ||
+ | Run startx | ||
+ | sudo startx & | ||
+ | |||
+ | Run ts_calibrate on /dev/fb2 | ||
+ | sudo TSLIB_FBDEVICE=/dev/fb2 TSLIB_TSDEVICE=/dev/input/touchscreen ts_calibrate | ||
+ | |||
+ | Follow the directions on the screen, touching each point.\\ | ||
+ | Then, you can run following command. | ||
+ | sudo TSLIB_FBDEVICE=/dev/fb2 TSLIB_TSDEVICE=/dev/input/touchscreen ts_test | ||
+ | |||
+ | ==== X11 Calibration ==== | ||
+ | 1. The xinput-calibrator pakage download | ||
+ | sudo apt-get install xinput-calibrator | ||
+ | |||
+ | 2. Remove old calibration data. | ||
+ | sudo rm /etc/X11/xorg.conf.d/99-calibration.conf | ||
+ | |||
+ | 3. Run calibrator\\ | ||
+ | You need to check DISPLAY=:N.0 | ||
+ | sudo FRAMEBUFFER=/dev/fb2 startx & | ||
+ | sudo DISPLAY=:0.0 xinput_calibrator | ||
+ | |||
+ | Follow the directions on your screen.\\ | ||
+ | then, you will get something like\\ | ||
+ | |||
+ | {{:en:c1:xinput_calibrator.png?500|}}\\ | ||
+ | |||
+ | Copy to "/etc/X11/xorg.conf.d/99-calibration.conf" | ||
+ | sudo mkdir /etc/X11/xorg.conf.d/ | ||
+ | sudo vi /etc/X11/xorg.conf.d/99-calibration.conf | ||
+ | |||
+ | 4. Reboot | ||
+ | sudo reboot |