Mahfoudh REBBAH / Mbed 2 deprecated chronometre

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(p24, p26, p27, p28, p29, p30);
00005 //TextLCD lcd(p15, p16, p17, p18, p19, p20); // rs, e, d4-d7
00006 Timer t;
00007  
00008 int main() {
00009 // Start timer
00010     t.start();
00011 // Clear LCD Screen
00012     lcd.cls();
00013     wait(1);
00014 // Print to LCD on first line
00015     //lcd.printf("Azul ===> Chrono");
00016     lcd.printf("Chrono  Mahfoudh");
00017     while (1) {
00018 // Move cursor to start of second display line
00019         lcd.locate(0,1);
00020 // Print elapsed time from timer on LCD
00021         lcd.printf("%e sec", t.read());
00022         wait(.2);
00023     }
00024 }