toggle 8 leds manually

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
PedroGonzalez
Date:
Mon Jun 13 18:09:59 2016 +0000
Commit message:
first commit

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	Mon Jun 13 18:09:59 2016 +0000
@@ -0,0 +1,40 @@
+#include "mbed.h"
+
+DigitalOut LED_1(PB_0);
+DigitalOut LED_2(PB_1);
+DigitalOut LED_3(PB_2);
+DigitalOut LED_4(PB_3);
+DigitalOut LED_5(PB_4);
+DigitalOut LED_6(PB_5);
+DigitalOut LED_7(PB_6);
+DigitalOut LED_8(PB_7);
+
+int main() 
+{
+ 
+ while(1)
+ {
+     LED_1 = 1;
+     LED_2 = 1;
+     LED_3 = 1;
+     LED_4 = 1;
+     LED_5 = 1;
+     LED_6 = 1;
+     LED_7 = 1;
+     LED_8 = 1;
+     
+     wait(0.5);
+    
+     LED_1 = 0;
+     LED_2 = 0;
+     LED_3 = 0;
+     LED_4 = 0;
+     LED_5 = 0;
+     LED_6 = 0;
+     LED_7 = 0;
+     LED_8 = 0;
+     
+     wait(0.5);
+ }
+ 
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Jun 13 18:09:59 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9296ab0bfc11
\ No newline at end of file