S5 / Mbed 2 deprecated HelloWorld

Dependencies:   mbed

Fork of HelloWorld by Simon Ford

Files at this revision

API Documentation at this revision

Comitter:
bbi22
Date:
Wed Jan 11 19:26:28 2017 +0000
Parent:
2:891e0c33df62
Commit message:
With terminal

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Wed Jan 11 18:59:43 2017 +0000
+++ b/main.cpp	Wed Jan 11 19:26:28 2017 +0000
@@ -1,14 +1,17 @@
 #include "mbed.h"
 
 DigitalOut myleds [] = {LED1, LED2, LED3, LED4};
+Serial pc(USBTX, USBRX);
 
 int main() {
     while(1) {
         for(int i = 0 ; i < 4 ; i++)
             myleds[i] = 1;
+        pc.printf("Allume!\r\n");
         wait(0.2);
         for(int i = 0 ; i < 4 ; i++)
             myleds[i] = 0;
+        pc.printf("Ferme!\r\n");
         wait(0.2);
     }
 }