Skip to content

Commit 8a027a9

Browse files
committed
Update basic-touch.md
1 parent 6dae741 commit 8a027a9

File tree

1 file changed

+6
-6
lines changed
  • content/hardware/10.mega/shields/giga-display-shield/tutorials/basic-touch

1 file changed

+6
-6
lines changed

content/hardware/10.mega/shields/giga-display-shield/tutorials/basic-touch/basic-touch.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: Karl Söderby
55
tags: [Display, Touch Screen]
66
---
77

8-
The [GIGA Display Shield](/hardware/giga-display-shield) has an advanced touch interface, supported via the [Arduino_GigaDisplayTouch]() library.
8+
The [GIGA Display Shield](/hardware/giga-display-shield) has an advanced touch interface, supported via the [Arduino_GigaDisplayTouch](https://github.com/arduino-libraries/Arduino_GigaDisplayTouch) library.
99

1010
This library is used to return the number of contact points, and the `x,y` coordinates for each of these. For example, touching the screen with two fingers somewhere on the screen would generate the following:
1111

@@ -35,7 +35,7 @@ This library works with the [lvgl](https://github.com/lvgl/lvgl) framework, whic
3535

3636
***Learn more about how to use the lvgl framework with the GIGA Display Shield in [this tutorial](/tutorials/giga-display-shield/lvgl-guide).***
3737

38-
## Print Coordinates Example
38+
## Coordinates Example
3939

4040
To retrieve the coordinates when touching the display, we can use the **Touch_Polling** example from the library. You will find it at **Arduino_GigaDisplayTouch > Touch_Polling** in the IDE (library needs to be installed), or you will find it just below:
4141

@@ -50,9 +50,9 @@ Touch controller init - OK
5050
Seeing this, you can start touching the display area with one or more fingers. The serial monitor will print out how many "contacts" aka fingers you are using, and the coordinates for each point. Here's an example response:
5151

5252
```
53-
Contacts: 2
54-
245 346
55-
178 473
53+
Contacts: 2 <---- two fingers used
54+
245 346 <---- x = 245, y = 346
55+
178 473 <---- x = 178, y = 473
5656
```
5757

5858
In this case, we have two touchpoints, and the coordinates for each of them printed below (`x`,`y`). And that's pretty much it to obtain a successful reading from the touch interface.
@@ -61,4 +61,4 @@ You can use this to build customised gestures on the screen such as swiping two
6161

6262
## Summary
6363

64-
In this tutorial, we have explored the **Arduino_GigaDisplayTouch** library and tested out an example that allows us to read the coordinates of our touches.
64+
In this tutorial, we have explored the **Arduino_GigaDisplayTouch** library and tested out an example that allows us to read the coordinates of our touches. This library is essential for developing sophisticated touch displays using the lvgl framework.

0 commit comments

Comments
 (0)