-
Notifications
You must be signed in to change notification settings - Fork 220
Install tslib on Raspberry Pi
Gary edited this page Jun 20, 2019
·
5 revisions
Overview > Installing on Raspberry Pi >
The PiTFT install script includes a basic installation of the tslib touch library. We will start by testing to see if it can communicate with your touch display correctly.
Please note that this page is in the process of being updated, so please check back in the next couple days.
ls -l /dev/input/touchscreen
sudo evtest /dev/input/touchscreen
- Now touch the display and ensure coordinates are being written to the console:

In order to enable libraries such as GUIslice to use tslib, we need to build the library from sources.
- Install the prerequisites:
sudo apt-get install git automake libtool
- Now compile and install tslib:
cd ~/dev
git clone git://github.com/kergoth/tslib.git
cd tslib
./autogen.sh
./configure
make
sudo make install 
- Now we can proceed by using ev_test:
sudo evtest /dev/input/touchscreen
sudo cp -P /usr/local/lib/libts* /usr/lib/arm-linux-gnueabihf/
sudo TSLIB_FBDEVICE=/dev/fb1 TSLIB_TSDEVICE=/dev/input/touchscreen ts_print
cd ~/dev
cd GUIslice/examples/linux
make ex04_lnx_ctrls
sudo ./ex04_lnx_ctrls