M. H. Al-Meer / Mbed 2 deprecated mbed_USB

Dependencies:   mbed

Revision:
1:077d8e1f21a8
Parent:
0:2c2981e27ad1
diff -r 2c2981e27ad1 -r 077d8e1f21a8 main.cpp
--- a/main.cpp	Sun Mar 27 17:46:06 2016 +0000
+++ b/main.cpp	Sun Mar 27 18:46:39 2016 +0000
@@ -3,10 +3,15 @@
 #include "mbed.h"
 
 Serial pc(USBTX, USBRX);
+DigitalOut myled(LED1);
+
 int main()
 {
- //   pc.printf("Could not open file for write\n"); // error if no pointer
-   // pc.printf("SD card file successfully opened\n"); // if pointer ok
-   pc.printf("Hello World!");
-  
+   while (1) { //a continuous loop is created
+        myled = 1; //switch the led on, by setting the output to logic 1
+        wait(0.2); //wait 0.2 seconds
+        myled = 0; //switch the led off
+        wait(0.2); //wait 0.2 seconds
+    }
+   
 }
\ No newline at end of file