The default Hello World program, used when you create a new program

Dependencies:   mbed

Fork of HelloWorld by Simon Ford

Files at this revision

API Documentation at this revision

Comitter:
Albertzhang
Date:
Mon Aug 05 08:22:47 2013 +0000
Parent:
1:03c191369089
Commit message:
4 LED togather light up

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 03c191369089 -r b478be6da8a8 main.cpp
--- a/main.cpp	Sun Jan 01 20:57:57 2012 +0000
+++ b/main.cpp	Mon Aug 05 08:22:47 2013 +0000
@@ -1,12 +1,21 @@
 #include "mbed.h"
 
-DigitalOut myled(LED1);
-
+DigitalOut myled0(LED1);
+DigitalOut myled1(LED2);
+DigitalOut myled2(LED3);
+DigitalOut myled3(LED4);
 int main() {
     while(1) {
-        myled = 1;
+        myled0 = 1;
+        myled1 = 1;
+        myled2 = 1;
+        myled3 = 1;
         wait(0.2);
-        myled = 0;
+        myled0 = 0;
+        myled1 = 0;
+        myled2 = 0;
+        myled3 = 0;
+      //  myled0 = 1;
         wait(0.2);
     }
 }