This class carries out software debouncing of Digitial in, and provides some method to look at details such as how many debounced rising and falling there have been, and how long the input has been in its current stable state.

Dependencies:   mbed

Revision:
0:672241227e0d
diff -r 000000000000 -r 672241227e0d main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Nov 27 16:05:32 2009 +0000
@@ -0,0 +1,16 @@
+#include "mbed.h"
+#include "DebouncedIn.h"
+
+
+DigitalOut led(LED1);
+DebouncedIn button(p21);
+
+int main() {
+
+    while(1) {
+        if (button.rising()) {
+           led = !led;
+        }
+    }
+
+}