esp-idf/examples/peripherals/touch_pad_interrupt
Angus Gratton 821c70f5d7 examples: Standardise naming of files, symbols, etc. in examples
* Use "example" in all example function & variable names,
  ie use i2c_example_xxx instead of i2c_xxx for example functions.
  Closes #198 https://github.com/espressif/esp-idf/issues/198
* Mark example functions, etc. static
* Replace uses of "test" & "demo" with "example"
* Split the UART example into two
* Rename "main" example files to end with "_main.c" for disambiguation
2017-03-27 17:42:05 +11:00
..
main examples: Standardise naming of files, symbols, etc. in examples 2017-03-27 17:42:05 +11:00
Makefile - examples: add 'Capacitive touch sensor read' example 2017-03-06 21:25:54 +01:00
README.md - examples: add 'Capacitive touch sensor read' example 2017-03-06 21:25:54 +01:00

README.md

Touch Pad Interrupt Example

Demonstrates how to set up ESP32's capacitive touch pad peripheral to trigger interrupt when a pad is touched.

Application has been developed and tested using ESP32 Demo Board V2 that has ten capacitive sensor pads T0 to T9 exposed.

alt text

The following output is shown when a pad is touched:

I (6303) Touch pad: Waiting for any pad being touched...
I (6733) Touch pad: T6 activated!
I (7333) Touch pad: T5 activated!
I (7723) Touch pad: T3 activated!
I (8043) Touch pad: T2 activated!
I (8883) Touch pad: T4 activated!
I (9523) Touch pad: T7 activated!
I (12503) Touch pad: Waiting for any pad being touched...
I (15483) Touch pad: T6 activated!
I (16253) Touch pad: T5 activated!
I (17903) Touch pad: Waiting for any pad being touched...
I (22903) Touch pad: Waiting for any pad being touched...

Note: Sensing threshold is set up automatically at start up by performing simple calibration. Application is reading current value for each pad and assuming half of this value as the sensing threshold. Do not touch pads on application start up, otherwise sensing may not work correctly.

For a simpler example how to configure and read capacitive touch pads, please refer to touch_pad_read.

See the README.md file in the upper level 'examples' directory for more information about examples.