keypad corretto controllare il debounce

Dependencies:   TextLCD keypad mbed

Revision:
0:70e08bdedcba
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun May 13 10:41:12 2018 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+#include "TextLCD.h"
+#include "keypad.h"
+
+
+
+TextLCD lcd(D2,D3,D4,D5,D6,D7); 
+
+Keypad telepad(PA_0 , PA_1 , PA_4 , PB_0,PA_13 , PA_14 , PC_2 , PC_3 );
+
+
+int main() {
+    lcd.locate(0,0);
+    lcd.printf("KeyBoard: ");
+    char key;
+    while(1){
+        lcd.locate(0,1);
+        key = telepad.getKey(); 
+        if(key != KEY_RELEASED){
+            lcd.printf( "%c" , key);
+            wait(0.6);
+        }else{
+            lcd.printf( "%c" , ' ');
+        }
+    }
+}