|Author:||Advamation, Roland Koebler (email@example.com)|
- The Advamation touchpanel-driver requires the uinput Linux kernel module. This module is usually already included in the kernel. But you can check by searching for CONFIG_INPUT_UINPUT= in your kernel-config-file (which is usually located in /boot/config-KERNELVERSION or /proc/config.gz).
- The touchpanel-test-program and the touchpanel-driver are automatically compiled with the other AdvaBoard RPi1 software, as described in the README-file.
- To install and configure the touchpanel-driver, and to calibrate the touchscreen, we recommend to use the install-/setup-script advaboard_rpi1_setup.sh.
- For more information about the TFT-display and the TFT-display-driver, see advamationfb.txt/advamationfb.html.
Power-off your Raspberry Pi and your AdvaBoard RPi1.
Connect the display incl. touchpanel to the AdvaBoard RPi1, and connect the AdvaBoard RPi1 to the Raspberry Pi.
Power-on the Raspberry Pi and the AdvaBoard RPi1.
Turn the display on (replace ## by your display-type, e.g. by TFT_32):
sudo am_rpi_tft_tool -t TFT_## -m ON
Test the display:
sudo am_rpi_tft_tool -t TFT_## -m TEST_ROTATE
Test the touchpanel:
sudo am_rpi_tft_tool -t TFT_## -m TEST_TP
When you now touch the touchpanel, some numbers should occur on the screen, e.g.:
Touch-Position: X 2318, Y 2293 ...
To stop the test, press Ctrl-C.
Before using the touchpanel, it has to be calibrated. The calibration-result can then be saved in a file.
Calibrate the touchpanel and store the result to e.g. TFT_tp.calib:
sudo am_rpi_tft_tool -t TFT_## -f TFT_tp.calib -m TP_CALIBRATE
You should now touch 3 positions, which are marked with a white crosshair. Try to touch them as exact as possible (maybe with a touchscreen-pen), since this determines how accurate the calibration will be.
Test the calibration:
sudo am_rpi_tft_tool -t TFT_## -f TFT_tp.calib -m TEST_TPCALIB
Now you can touch the screen, and the touch-position is displayed. If the crosshair isn't displayed exactly enough under the touch-positions, try to calibrate the touchpanel again.
Afterwards, abort the test with Ctrl-C.
The touchpanel can be accessed directly by your own programs using the libam_rpi_tft library, or by the commandline-program am_rpi_tft_tool. Additionally, there's a touchpanel-driver for Linux.
To use the touchpanel-driver, insert the kernel-module "uinput" and use the commandline-program "am_rpi_touchpanel" (see am_rpi_touchpanel --help for more information):
sudo modprobe uinput sudo am_rpi_touchpanel -t TFT_## -r ANGLE -f CALIBFILE
with TFT_## replaced by your display-model (e.g. TFT_32), ANGLE replaced by the rotation of your screen (0, 90, 180 or 270) and CALIBFILE replaced by the filename or your touchpanel-calibration-file (e.g. TFT_tp.calib). Now, the touchpanel should work under X11.