Leidy Catalina Rodríguez Laverde / Mbed 2 deprecated Lcd_Teclado

Dependencies:   TextLCD mbed

Revision:
0:a067ddd9b10d
diff -r 000000000000 -r a067ddd9b10d main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Sep 23 20:39:15 2017 +0000
@@ -0,0 +1,32 @@
+#include "mbed.h"
+#include "TextLCD.h"
+BusOut salida(D8,D9,D10,D11);
+BusIn entrada(D12,D13,D14,D15);
+int filas [5]={0,1,2,4,8};
+char tecla [6][6];
+int lectura;
+Serial pc(USBTX,USBRX);
+TextLCD Ale(D2,D3,D4,D5,D6,D7);
+int main() 
+{     
+    tecla [1][1]='1';tecla [1][2]='2';tecla [1][3]='3';tecla [1][4]='A'; //MATRIZ
+    tecla [2][1]='4';tecla [2][2]='5';tecla [2][3]='6';tecla [2][4]='B';
+    tecla [3][1]='7';tecla [3][2]='8';tecla [3][3]='8';tecla [3][4]='C';
+    tecla [4][1]='*';tecla [4][2]='0';tecla [4][3]='#';tecla [4][4]='D';
+     
+    while(1) 
+    {
+          for(int o=1;o<5;o++)
+          {
+              salida=filas[o];
+              lectura=entrada.read();
+              if (lectura==4){lectura=3;}if (lectura==8){lectura=4;}
+              if (lectura!=0)
+              {
+                  Ale.printf("YA SIRVO Y DOY: %c\n\r",tecla[o][lectura]);
+                          wait(0.2);}
+              }
+        }
+        
+    }
+