Making things flash in all colours

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
spyclub
Date:
Sat Jul 12 13:48:13 2014 +0000
Child:
1:ba3df483c915
Commit message:
Lets make things flash

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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Jul 12 13:48:13 2014 +0000
@@ -0,0 +1,27 @@
+#include "mbed.h"
+
+DigitalOut redLED(LED1);
+DigitalOut greenLED(LED2);
+DigitalOut blueLED(LED3);
+
+int main() {
+    redLED = 1;
+    greenLED = 1;
+    blueLED = 1;
+    while(1) {
+        redLED = 0;
+        wait(2.0);
+        redLED = 1;
+        wait(2.0);
+        
+        greenLED = 0;
+        wait(2.0);
+        greenLED = 1;
+        wait(2.0);
+        
+        blueLED = 0;
+        wait(2.0);
+        blueLED = 1;
+        wait(2.0);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Jul 12 13:48:13 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/04dd9b1680ae
\ No newline at end of file