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.
AjK Namespace Reference
DebounceIn adds mechanical switch debouncing to DigitialIn. More...
Detailed Description
DebounceIn adds mechanical switch debouncing to DigitialIn.
Example:
#include "mbed.h" #include "DebounceIn.h" DebounceIn d(p5); DigitialOut led1(LED1); DigitialOut led2(LED2); int main() { while(1) { led1 = d; led2 = d.read(); } }
- See also:
- set_debounce_us() To change the sampling frequency.
- set_samples() To alter the number of samples.
Users of this library may also be interested in PinDetect library:-
This example shows one input displayed by two outputs. The input is debounced by the default 10ms.
Generated on Wed Jul 13 2022 08:13:48 by
1.7.2