Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
00001 #include "mbed.h" 00002 #include "TextLCD.h" 00003 BusOut salida(D8,D9,D10,D11); 00004 BusIn entrada(D12,D13,D14,D15); 00005 int filas [5]={0,1,2,4,8}; 00006 char tecla [6][6]; 00007 int lectura; 00008 Serial pc(USBTX,USBRX); 00009 TextLCD Ale(D2,D3,D4,D5,D6,D7); 00010 int main() 00011 { 00012 tecla [1][1]='1';tecla [1][2]='2';tecla [1][3]='3';tecla [1][4]='A'; //MATRIZ 00013 tecla [2][1]='4';tecla [2][2]='5';tecla [2][3]='6';tecla [2][4]='B'; 00014 tecla [3][1]='7';tecla [3][2]='8';tecla [3][3]='8';tecla [3][4]='C'; 00015 tecla [4][1]='*';tecla [4][2]='0';tecla [4][3]='#';tecla [4][4]='D'; 00016 00017 while(1) 00018 { 00019 for(int o=1;o<5;o++) 00020 { 00021 salida=filas[o]; 00022 lectura=entrada.read(); 00023 if (lectura==4){lectura=3;}if (lectura==8){lectura=4;} 00024 if (lectura!=0) 00025 { 00026 Ale.printf("YA SIRVO Y DOY: %c\n\r",tecla[o][lectura]); 00027 wait(0.2);} 00028 } 00029 } 00030 00031 } 00032
Generated on Sat Jul 16 2022 14:17:24 by
1.7.2