Mahfoudh REBBAH
/
chronometre
Chronomètre et affichage des résultat sur afficheur LCD
main.cpp
- Committer:
- Mahfoudh
- Date:
- 2013-10-11
- Revision:
- 0:916dace94367
File content as of revision 0:916dace94367:
#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); } }