First mbed program example and usage

Dependencies:   mbed

Fork of HelloWorld by Simon Ford

Files at this revision

API Documentation at this revision

Comitter:
efoster79
Date:
Sat Oct 18 13:19:48 2014 +0000
Parent:
1:03c191369089
Child:
3:26b01dec4312
Commit message:
First mbed program (reference code)

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sun Jan 01 20:57:57 2012 +0000
+++ b/main.cpp	Sat Oct 18 13:19:48 2014 +0000
@@ -1,12 +1,15 @@
 #include "mbed.h"
 
-DigitalOut myled(LED1);
+DigitalOut outled1(LED1);
+DigitalOut outled3(LED3);
 
 int main() {
     while(1) {
-        myled = 1;
-        wait(0.2);
-        myled = 0;
-        wait(0.2);
+        outled1 = 1;
+        outled3 = 0;
+        wait(1);
+        outled1= 0;
+        outled3 = 1;
+        wait(1);
     }
 }