Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of TouchSense by
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 Tue Jul 12 2022 18:33:36 by
1.7.2
