A capacitive touch sensor using a analog input port.
Dependents: TouchSenseTestProgram
TouchSense Class Reference
A capacitive touch sensor using analog input port. More...
#include <TouchSense.h>
Public Member Functions | |
TouchSense (PinName pin, int thr=10) | |
Create a TouchSense connected to the specified pin. |
Detailed Description
A capacitive touch sensor using analog input port.
Example:
#include "mbed.h" TouchSense tp(p18); int main() { tp.calibration(); while(1) { if (tp.sense()) { printf("ON\r\n"); } else { printf("OFF\r\n"); } wait(0.1); } }
Definition at line 49 of file TouchSense.h.
Constructor & Destructor Documentation
TouchSense | ( | PinName | pin, |
int | thr = 10 |
||
) |
Create a TouchSense connected to the specified pin.
- Parameters:
-
pin TouchSense pin to connect to thr Threshold (1 to 20)
Definition at line 59 of file TouchSense.h.
Generated on Fri Jul 15 2022 02:23:00 by 1.7.2