Mahfoudh REBBAH
/
chronometre
Chronomètre et affichage des résultat sur afficheur LCD
Diff: main.cpp
- Revision:
- 0:916dace94367
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Oct 11 17:57:12 2013 +0000 @@ -0,0 +1,24 @@ +#include "mbed.h" +#include "TextLCD.h" + +TextLCD lcd(p24, p26, p27, p28, p29, p30); +//TextLCD lcd(p15, p16, p17, p18, p19, p20); // rs, e, d4-d7 +Timer t; + +int main() { +// Start timer + t.start(); +// Clear LCD Screen + lcd.cls(); + wait(1); +// Print to LCD on first line + //lcd.printf("Azul ===> Chrono"); + lcd.printf("Chrono Mahfoudh"); + while (1) { +// Move cursor to start of second display line + lcd.locate(0,1); +// Print elapsed time from timer on LCD + lcd.printf("%e sec", t.read()); + wait(.2); + } +}