ok

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
montagny
Date:
Tue Mar 06 20:36:40 2018 +0000
Parent:
0:092ac2bb88b9
Commit message:
ok

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 092ac2bb88b9 -r 8796c0464bdd main.cpp
--- a/main.cpp	Tue Mar 06 20:35:42 2018 +0000
+++ b/main.cpp	Tue Mar 06 20:36:40 2018 +0000
@@ -1,12 +1,17 @@
 #include "mbed.h"
 
-DigitalOut myled(LED1);
+DigitalOut myled(LED1);             // User LED
+Serial pc(SERIAL_TX, SERIAL_RX);    // 9600 bauds rate
+
 
 int main() {
+    pc.printf("Bienvenue dans l'application de test : Led BLink\r\n");
     while(1) {
-        myled = 1; // LED is ON
-        wait(0.2); // 200 ms
-        myled = 0; // LED is OFF
-        wait(1.0); // 1 sec
+        myled = 1;
+        pc.printf("LED ON\r\n");
+        wait(2);
+        myled = 0;
+        pc.printf("LED OFF\r\n");
+        wait(2);
     }
-}
+}
\ No newline at end of file