/*Simple program to exercise the LEDs * For the LandTiger Board

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
alex_G_blanco
Date:
Sat Mar 12 01:20:44 2016 +0000
Commit message:
/*Simple program to exercise the LEDs; * For the LandTiger Board

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 Mar 12 01:20:44 2016 +0000
@@ -0,0 +1,18 @@
+/*Simple program to exercise the LEDs
+* For the LandTiger Board
+*/
+
+#include "mbed.h"
+
+//Create a Bus with the 8 LEDS. Pins corresponds to LD4 to LD11
+BusOut LEDS(P2_7, P2_6, P2_5, P2_4, P2_3, P2_2, P2_1, P2_0);
+
+int main() {
+    while(1) {
+        //cycle the LEDS in bynary order
+        for(int i=0; i<=256; i++) { //8 bits
+            LEDS = i; //assign value to bus, turns on LEDS in hexa mode
+            wait(0.1); //timer of the LEDS sequence
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Mar 12 01:20:44 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/252557024ec3
\ No newline at end of file