fork of Official_mBuino
Dependencies: mbed
Fork of Official_mBuino by
Revision 0:c72235e68f52, committed 2014-09-13
- Comitter:
- Experiment626
- Date:
- Sat Sep 13 03:20:40 2014 +0000
- Child:
- 1:f89a6b63eae7
- Commit message:
- Official mBuino Firmware 1.0
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 Sep 13 03:20:40 2014 +0000 @@ -0,0 +1,42 @@ +#include "mbed.h" + +DigitalOut LED[] = {(LED1), (LED2), (LED3), (LED4), (LED5), (LED6), (LED7)};// 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 Sat Sep 13 03:20:40 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/552587b429a1 \ No newline at end of file