Exo

Dependencies:   IHM_V2 mbed

Files at this revision

API Documentation at this revision

Comitter:
Quent1nl
Date:
Tue May 29 14:17:48 2018 +0000
Commit message:
EX31

Changed in this revision

IHM_V2.lib Show annotated file Show diff for this revision Revisions of this file
Nboard.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 4bd9d2bb5e89 IHM_V2.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/IHM_V2.lib	Tue May 29 14:17:48 2018 +0000
@@ -0,0 +1,1 @@
+http://os.mbed.com/teams/NBoard/code/IHM_V2/#ad91067e3f6d
diff -r 000000000000 -r 4bd9d2bb5e89 Nboard.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Nboard.h	Tue May 29 14:17:48 2018 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+#include "IHM.h"
+
+IHM ihm;
+Timer timer;
+
+#define Ana0 000
+#define Ana1 001
+#define Ana2 010
+#define Ana3 011
+#define Ana4 100
+#define Ana5 101
+#define AnIn 110
+#define Ana7 111
+
+
+DigitalOut led0(PB_3), led1(PA_7),led2(PA_6),led3(PA_5),led4(PA_3),led5(PA_1),led6(PA_0),led7(PA_2);
+DigitalIn bp(PA_9, PullUp),bou1(PA_10,PullUp),bou2(PB_0,PullUp),bou3(PB_7,PullUp);
+BusOut Bus8Leds(PB_3,PA_7,PA_6,PA_5,PA_3,PA_1,PA_0,PA_2);
+BusOut BusSelMux(PF_0,PF_1,PA_8);
+AnalogIn AnaIn(PB_1);
diff -r 000000000000 -r 4bd9d2bb5e89 main.cpp
--- /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
diff -r 000000000000 -r 4bd9d2bb5e89 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue May 29 14:17:48 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/5aab5a7997ee
\ No newline at end of file