A blinky variation for the mBuino with a bunch of different blink modes, deep-sleeping between iterations.

Dependencies:   Crypto RNG mbed WakeUp

Fork of mBuinoBlinky by Aron Phillips

mBuino blinky experiments.

Files at this revision

API Documentation at this revision

Comitter:
Experiment626
Date:
Mon Jul 14 19:09:55 2014 +0000
Child:
1:47c61bf9c81e
Commit message:
mBuinoBlinky Published

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 Jul 14 19:09:55 2014 +0000
@@ -0,0 +1,42 @@
+#include "mbed.h"
+
+DigitalOut LED[] = {(P0_7), (P0_8), (P0_2), (P0_20), (P1_19), (P0_17), (P0_23)};// declare 7 LEDs
+
+float delayTime = .05;
+
+int main()
+{
+    while(1)
+    {
+        delayTime = 0.05;
+        for(int x = 0; x < 7; x++)
+        {
+            LED[x] = 1; // turn on
+            wait(.2); // delay
+        
+            LED[x] = 0; // turn off
+            wait(delayTime); // delay
+        }
+        for(int x = 6; x >= 0; x--)
+        {
+            LED[x] = 1; // turn on
+            wait(.2); // delay
+        
+            LED[x] = 0; // turn off
+            wait(delayTime); // delay
+        }
+
+        for(int x = 0; x < 7; x++)
+        {
+            LED[x] = 1; // turn on
+            wait(delayTime); // delay
+        }
+        for(int x = 6; x >= 0; x--)
+        {
+            LED[x] = 0; // turn off
+            wait(delayTime); // delay
+        }
+        
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Jul 14 19:09:55 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/024bf7f99721
\ No newline at end of file