Skip to content

Commit 2b7c34e

Browse files
update docs/README.md
1 parent 6ac74da commit 2b7c34e

File tree

1 file changed

+50
-1
lines changed

1 file changed

+50
-1
lines changed

docs/README.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,50 @@
1-
# Arduino Giga Display Touch Library
1+
# Arduino Giga Display Touch Library
2+
3+
[![License](https://img.shields.io/badge/License-LGPLv3-blue.svg)]()
4+
5+
The Arduino Giga Display Touch library is a C++ library designed to manage the touch controller of the Giga Display Shield. It is currently compatible with Goodix GT911 5-point Capacitive touch controller.
6+
7+
This library captures up to 5 concurrent touch points.
8+
9+
The library provides methods to initialize the touch controller, detect touch points, and access to the coordinates of the points. It supports two configuration options: by interrupt or on-request. With the interrupt approach, the library notifies the user when a touch is detected, while with on-request, it is the user's responsibility to query the library to determine if a touch has occurred.
10+
11+
## Features
12+
13+
- Captures up to 5 concurrent touch points
14+
- Retrieve touch points coordinates
15+
- Supports dual configuration: interrupt or on-request
16+
17+
## Usage
18+
19+
To use this library, you must have a supported Arduino board and the Arduino Giga Display shield. Once you have connected the display shield to the board, you can include the touch library in your Arduino sketch and use its functions to capture touch points and access to the coordinate values. Here is a minimal example for the Arduino GIGA R1 WiFi:
20+
21+
```cpp
22+
#include "Arduino_GigaDisplayTouch.h"
23+
24+
Arduino_GigaDisplayTouch touch;
25+
26+
void setup() {
27+
touch.begin();
28+
}
29+
30+
void loop() {
31+
uint8_t contacts;
32+
GDTpoint_t points[5];
33+
34+
if(touch.detect(contacts, points)) {
35+
//Do something with the touch coordinates
36+
}
37+
}
38+
```
39+
## Examples
40+
41+
- **Touch_IRQ:** This example demonstrates how to detect touch event and retrieve coordinate values using the interrupt approach.
42+
- **Touch_Polling:** This example demonstrates how to detect touch event and retrieve coordinate values using the polling/on-request approach.
43+
44+
## API
45+
46+
The API documentation can be found [here](./api.md).
47+
48+
## License
49+
50+
This library is released under the [LGPLv3 license]().

0 commit comments

Comments
 (0)