
led1
Revision 0:580c20228743, committed 2015-03-16
- Comitter:
- trivla
- Date:
- Mon Mar 16 15:30:14 2015 +0000
- Commit message:
- led1
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 Mar 16 15:30:14 2015 +0000 @@ -0,0 +1,33 @@ +#include "mbed.h" + +DigitalOut d20(P1_13); +DigitalOut d19(P1_12); +DigitalOut d18(P1_7); +DigitalOut d17(P1_6); + + void SimpleRunLight(); +int main(void) +{ + while (1) + { + d17=0; + d18=0; + d19=0; + d20=0; + + SimpleRunLight(); + } +} + +void SimpleRunLight() +{ + d17=1; + wait(5); + d17=0; d18=1; + wait(5); + d18=0; d19=1; + wait(5); + d19=0; d20=1; + wait(5); + d20=0; +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Mar 16 15:30:14 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/4fc01daae5a5 \ No newline at end of file