Programa Teclao y LCD

Dependencies:   Keypad TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
franni
Date:
Thu Apr 27 05:47:14 2017 +0000
Commit message:
Teclado LCD

Changed in this revision

Keypad.lib Show annotated file Show diff for this revision Revisions of this file
TextLCD.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 52ff9a225855 Keypad.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Keypad.lib	Thu Apr 27 05:47:14 2017 +0000
@@ -0,0 +1,1 @@
+https://mbed.org/users/grantphillips/code/Keypad/#4bbd88022a6f
diff -r 000000000000 -r 52ff9a225855 TextLCD.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Thu Apr 27 05:47:14 2017 +0000
@@ -0,0 +1,1 @@
+https://mbed.org/users/simon/code/TextLCD/#308d188a2d3a
diff -r 000000000000 -r 52ff9a225855 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Apr 27 05:47:14 2017 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+#include "TextLCD.h"
+#include "Keypad.h"
+
+TextLCD lcd(PTE20,PTE21,PTE22,PTE23,PTE29,PTE30, TextLCD::LCD16x2); // Rs, E, d4, d5, d6, d7, RW=GND
+Keypad keypad(PTC4,PTC3,PTC0,PTC7,PTC11,PTC10,PTC6,PTC5); // c1, c2, c3, c4, f1, f2, f3, f4
+
+char key;
+int released=1;
+
+int main()
+{
+    lcd.printf("Teclado y LCD");
+    wait(1);
+    lcd.cls();
+
+    while (1) {
+        key=keypad.ReadKey();
+        if(key=='\0') released=1;
+        if((key!='\0') && (released==1)) {
+            lcd.locate(0,0);
+            lcd.printf("Tecla Pulsada: %c",key);
+            released=0;
+        }
+
+        wait(.1);
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 52ff9a225855 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Apr 27 05:47:14 2017 +0000
@@ -0,0 +1,1 @@
+https://mbed.org/users/mbed_official/code/mbed/builds/97feb9bacc10
\ No newline at end of file