Home Elements Boards Recipes

Display TouchGT911 Element

The DisplayTouchGT911 Element enables retrieving touch events on displays using the Capacitive Touch Sensor based on the GT911 chip.

The DisplayTouchElements share the same functionality while supporting different Touch controllers. See Display Touch Elements for details on how Buttons on the display can be used.

The GT911 Controller is using the i2c bus for communication.

Usually the GT911 controller need no configuration while operating because once programmed configurations (like resolution and hardware specifics) have been saved in the controller by the manufacturer. There is a special sketch gt911setup.ino available to inspect the current configuration and even update an existing one. Be sure what you do when you use it.

Driver implementation

There is no general usable Arduino library available for this chip so a specific driver was implemented.

The driver for this chip is embedded in the HomeDing library in folder src/lib. It will be included in the firmware binary when the DisplayTouchGT911 Element is included using the definition HOMEDING_INCLUDE_DISPLAYTOUCHGT911 is used in the man sketch.

The driver only covers functionality for detecting touch events but not for configuration. It automatically detects the used i2c address of the touch controller.

Other Driver implementation for other environments and non maintained libraries can be found in GitHub. The implementation documentaton and the reference implementation from Goodix for Android was taken as a primary source.

Element Configuration

The following properties are available for configuration of the element:

address – The I2C address of the GT911 controller. The driver can autodetect the i2c address.

width – The width of the touch surface

height – The height of the touch surface

rotation – Rotation of the display in use using 0, 90, 180 or 270 degree.

Boards

The following boards are using the GT911 controller:

See also

Tags

Element Display Input Wip