led sequence

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
solidcris
Date:
Sat Mar 07 19:38:46 2015 +0000
Commit message:
led seq 1 2 3 and 4

Changed in this revision

mbed.lib Show annotated file Show diff for this revision Revisions of this file
seq_led.cpp Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.lib	Sat Mar 07 19:38:46 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/gokmenascioglu/code/mbed/#a8fa94490a0a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/seq_led.cpp	Sat Mar 07 19:38:46 2015 +0000
@@ -0,0 +1,37 @@
+#include "mbed.h"
+
+
+//pin direction name_pin(pin_MBED)
+DigitalOut led1(LED1);
+DigitalOut led2(LED2);
+DigitalOut led3(LED3);
+DigitalOut led4(LED4);
+
+int main(void){
+    while(1){
+        led1 = 1;
+        led2 = 0;
+        led3 = 0;
+        led4 = 0;
+        wait(0.2);
+        
+        led1 = 0;
+        led2 = 1;
+        led3 = 0;
+        led4 = 0;
+        wait(0.2);
+        
+        led1 = 0;
+        led2 = 0;
+        led3 = 1;
+        led4 = 0;
+        wait(0.2);
+        
+        led1 = 0;
+        led2 = 0;
+        led3 = 0;
+        led4 = 1;
+        wait(0.2);        
+    }
+    
+}
\ No newline at end of file