simple digital out test for Kieran and George

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
nherriot
Date:
Sat Oct 13 16:08:49 2012 +0000
Parent:
1:47ca6e1d2bb2
Commit message:
simple led demo

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
mbed.lib Show diff for this revision Revisions of this file
diff -r 47ca6e1d2bb2 -r 9f49540bdf29 main.cpp
--- a/main.cpp	Mon May 14 16:35:46 2012 +0000
+++ b/main.cpp	Sat Oct 13 16:08:49 2012 +0000
@@ -1,9 +1,12 @@
 #include "mbed.h"
 
 DigitalOut red(p5);
+DigitalOut green(p6);
 DigitalOut myled(LED1);
 DigitalOut myled2(LED2);
 
+int myDelay = 2;
+
 //DigitalOut green(p6);
 //DigitalOut blue(p7);
 
@@ -13,12 +16,15 @@
     while(1) {
     
         red = 1;
+        green = 0;
         myled = 1;
+        myled2 = 0;
+        wait(myDelay);
+        red = 0;
+        green = 1;
+        myled = 0;
         myled2 = 1;
-        wait(2);
-        red = 0;
-        myled = 0;
-        myled2 = 0;
+        wait(myDelay);
     }    
    
 }
diff -r 47ca6e1d2bb2 -r 9f49540bdf29 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Oct 13 16:08:49 2012 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/737756e0b479
\ No newline at end of file
diff -r 47ca6e1d2bb2 -r 9f49540bdf29 mbed.lib
--- a/mbed.lib	Mon May 14 16:35:46 2012 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://mbed.org/projects/libraries/svn/mbed/trunk@43
\ No newline at end of file