Skip to content

Configure Touch Support

Calvin Hass edited this page Feb 10, 2019 · 35 revisions

Overview > Configuring GUIslice >

This page details the steps involved in configuring GUIslice to ensure that the touchscreen is operating properly.

Select the correct Display & Touch Drivers!

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.

Using GUIslice Touch Diagnostic / Calibration

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.

Configuring various touch handlers:

Other touch configuration details:

Debugging Touch Issues

  • 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.
Clone this wiki locally