Exo

Dependencies:   IHM_V2 mbed

Revision:
0:4bd9d2bb5e89
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue May 29 14:17:48 2018 +0000
@@ -0,0 +1,35 @@
+#include "Nboard.h"
+
+void clg_leds(float n){
+    for (int i=0; i<=100; i++) {
+        Bus8Leds=0xAA;
+        wait(n);
+        Bus8Leds=0x55;
+        wait(n);
+    }
+}
+
+void afficher_time(){
+    float time=timer.read();
+    ihm.LCD_gotoxy(0,0);
+    ihm.LCD_printf("Time =%f ",time);
+    }
+
+int main()
+{
+    ihm.LCD_clear();
+    float time;
+    while(1) {
+        timer.start();
+        time=0;
+        while(time<3) {
+            afficher_time();
+            if(bp==0) {
+                clg_leds(0.4);
+            }
+            time=timer.read();
+        }
+        clg_leds(0.1);
+        
+    }
+}
\ No newline at end of file