-
Notifications
You must be signed in to change notification settings - Fork 211
Configure Touch Support
Overview > Configuring GUIslice >
This page details the steps involved in configuring GUIslice to ensure that the touchscreen is operating properly.
A prerequisite for configuring the touch handling is to confirm the correct display driver (DRV_DISP_*
) and touch drivers (DRV_TOUCH_*
) have been selected (in your config file SECTION 1). Please refer to the Configuring GUIslice for details. Some specific examples have been provided for common TFT displays.
Once the display has been configured correctly to run with GUIslice and the correct touch driver has been selected, certain touchscreen devices may require some additional steps to ensure the touch presses are responding accurately.
In order to ensure the touchscreen has been configured correctly, three diagnostic sketches have been provided:
-
diag_ard_touch_detect
: Detects pin configuration for simple 4-wire resistive touch displays -
diag_ard_touch_calib
: Detects touch calibration settings for resistive touch displays -
diag_ard_touch_test
: Demonstrates operation with current touch calibration settings for all displays
Note that some of the above diagnostic sketches are specific to certain touch display types (eg. resistive) and is not intended to run on other displays.
It is strongly recommended that users run the diagnostic sketches before attempting to run any other examples using touch support.
For resistive displays that require touchscreen calibration, the TFT Diagnostic provides the values that can be copied into your config file for accurate touchscreen operation. Note that most example configurations include default calibration parameters, but these defaults will not provide accurate touch handling for all displays.
- Please select the appropriate guide based on the type of touch controller. The
DRV_TOUCH_*
setting will be found in SECTION 1 of your config file. -
DRV_TOUCH_FT6206
: FT6206 Capacitive Touch -
DRV_TOUCH_STMPE610
: STMPE610 Resistive Touch -
DRV_TOUCH_XPT2046
: XPT2046 Resistive Touch -
DRV_TOUCH_TFT_ESPI
: TFT_eSPI XPT2046 Resistive Touch -
DRV_TOUCH_SIMPLE
: 4-wire Simple Resistive Touch
- In order to assist in diagnosing touch issues, the
diag_ard_touch_test
diagnostic is the first place to start. It will demonstrate how the touch presses line up to the display along with additional details. - For more detailed debug, it is possible to enable (uncomment)
DBG_TOUCH
in SECTION 10 of your configuration file. This will provide extensive touch detect event reporting to the serial monitor and also mark touch presses on the screen with yellow boxes. - Additional debugging recommendations will be provided later.