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.
Dependencies: Keypad TextLCD mbed
main.cpp
00001 #include "mbed.h" 00002 #include "TextLCD.h" 00003 #include "Keypad.h" 00004 00005 TextLCD lcd(PTE20,PTE21,PTE22,PTE23,PTE29,PTE30, TextLCD::LCD16x2); // Rs, E, d4, d5, d6, d7, RW=GND 00006 Keypad keypad(PTC4,PTC3,PTC0,PTC7,PTC11,PTC10,PTC6,PTC5); // c1, c2, c3, c4, f1, f2, f3, f4 00007 00008 char key; 00009 int released=1; 00010 00011 int main() 00012 { 00013 lcd.printf("Teclado y LCD"); 00014 wait(1); 00015 lcd.cls(); 00016 00017 while (1) { 00018 key=keypad.ReadKey(); 00019 if(key=='\0') released=1; 00020 if((key!='\0') && (released==1)) { 00021 lcd.locate(0,0); 00022 lcd.printf("Tecla Pulsada: %c",key); 00023 released=0; 00024 } 00025 00026 wait(.1); 00027 } 00028 }
Generated on Tue Jul 19 2022 11:22:20 by
1.7.2