README.md
1| Supported Targets | ESP32-S2 |
2| ----------------- | -------- |
3
4# Touch Element basic example (EVENT)
5
6This example demonstrates how to use the Touch Element library of capacitive touch sensor and set up touch matrix.
7
8## How to use example
9
10### Configure the project
11
12* Set the target of the build (where `{IDF_TARGET}` stands for the target chip such as `esp32` or `esp32s2`).
13* Run `menuconfig` to select a dispatch method for the example.
14
15### Build and Flash
16
17Build the project and flash it to the target board, then run monitor tool to view serial output:
18
19```
20idf.py -p PORT flash monitor
21```
22
23(Replace PORT with the name of the serial port to use.)
24
25(To exit the serial monitor, type ``Ctrl-]``.)
26
27See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.
28
29## Example Output
30
31```
32I (331) Touch Matrix Example: Touch element library installed
33I (331) Touch Matrix Example: Touch matrix installed
34I (341) Touch Matrix Example: Touch matrix created
35I (341) Touch Matrix Example: Touch element library start
36I (1951) Touch Matrix Example: Matrix Press, axis: (0, 0) index: 0
37I (2131) Touch Matrix Example: Matrix Release, axis: (0, 0) index: 0
38I (3121) Touch Matrix Example: Matrix Press, axis: (1, 1) index: 4
39I (3281) Touch Matrix Example: Matrix Release, axis: (1, 1) index: 4
40I (4621) Touch Matrix Example: Matrix Press, axis: (2, 0) index: 6
41I (4801) Touch Matrix Example: Matrix Release, axis: (2, 0) index: 6
42I (5381) Touch Matrix Example: Matrix Press, axis: (2, 2) index: 8
43I (5571) Touch Matrix Example: Matrix Release, axis: (2, 2) index: 8
44I (6221) Touch Matrix Example: Matrix Press, axis: (0, 2) index: 2
45I (6441) Touch Matrix Example: Matrix Release, axis: (0, 2) index: 2
46I (7551) Touch Matrix Example: Matrix Press, axis: (1, 1) index: 4
47I (8551) Touch Matrix Example: Matrix LongPress, axis: (1, 1) index: 4
48I (9551) Touch Matrix Example: Matrix LongPress, axis: (1, 1) index: 4
49I (10551) Touch Matrix Example: Matrix LongPress, axis: (1, 1) index: 4
50I (11031) Touch Matrix Example: Matrix Release, axis: (1, 1) index: 4
51```
52
53See the README.md file in the upper level 'examples' directory for more information about examples.
54