OVMS3-idf/examples/peripherals/touch_pad_interrupt
Wangjialin 842caaab21 driver(touch): fix bug and add more features
1. add sens_struct.h
2. add definition of RTCCNTL and RTCIO
3. modify touch pad examples
4. update example code.
5. add comments add option in menuconfig
6. fix issue that pad index 8 and 9 are mismatched
7. add touch_pad_read_filtered() api to get value filtered by iir filter
8. modify touch pad isr func
9. Make the items in perihperal.ld in the sequence of address
10. delete Kconfig for touch pad
11. add touchpad filter APIs to adjust the filter
12. add touch_pad into index.rst
13. add touch_pad in Doxyfile
14. add touch_pad.rst
2017-08-22 21:21:39 +08:00
..
main driver(touch): fix bug and add more features 2017-08-22 21:21:39 +08: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

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.