Rene Cruz / Mbed 2 deprecated LCD_Clock

Dependencies:   TextLCD mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "TextLCD.h"
00003 
00004 TextLCD lcd(p20,p19,p21,p22,p23,p24); //rs,e,d4,d5,d6,d7
00005 int s,m,h;
00006 
00007 int main() {
00008     while(1){
00009         for(h=0;h<24;h++){
00010             for(m=0;m<60;m++){
00011                 for(s=0;s<60;s++){
00012                     wait(1);
00013                     lcd.locate(0,1);
00014                     lcd.printf("Reloj: %2d:%2d:%2d",h,m,s);
00015                     }
00016                 }
00017             }
00018         }
00019 }