keypad corretto controllare il debounce

Dependencies:   TextLCD keypad mbed

Files at this revision

API Documentation at this revision

Comitter:
fdalforno
Date:
Sun May 13 10:41:12 2018 +0000
Commit message:
keypad corretto

Changed in this revision

TextLCD.lib Show annotated file Show diff for this revision Revisions of this file
keypad.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 70e08bdedcba TextLCD.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Sun May 13 10:41:12 2018 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/TextLCD/#308d188a2d3a
diff -r 000000000000 -r 70e08bdedcba keypad.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/keypad.lib	Sun May 13 10:41:12 2018 +0000
@@ -0,0 +1,1 @@
+http://os.mbed.com/users/DimiterK/code/keypad/#1fa357ea3fcc
diff -r 000000000000 -r 70e08bdedcba main.cpp
--- /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" , ' ');
+        }
+    }
+}
diff -r 000000000000 -r 70e08bdedcba mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun May 13 10:41:12 2018 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/5aab5a7997ee
\ No newline at end of file