Daphny Oviya
/
stp
.
Revision 0:e3de08a92ba6, committed 2014-03-26
- Comitter:
- daphny_oviya
- Date:
- Wed Mar 26 11:04:44 2014 +0000
- Commit message:
- .
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 |
diff -r 000000000000 -r e3de08a92ba6 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Mar 26 11:04:44 2014 +0000 @@ -0,0 +1,109 @@ +#include "mbed.h" + +DigitalOut pin1(p5); +DigitalOut pin2(p6); +DigitalOut pin3(p7); +DigitalOut pin4(p8); +DigitalOut myled1(LED1); +DigitalOut myled2(LED2); +DigitalOut myled3(LED3); +DigitalOut myled4(LED4); +int i; + + +int main() { +while(1) +{ +for(i=0;i<=2;i++) + + pin1=1; + pin2=1; + pin3=0; + pin4=0; + myled1=1; + wait(0.1); + + pin1=0; + pin2=1; + pin3=1; + pin4=0; + myled2=1; + wait(0.1); + + pin1=0; + pin2=0; + pin3=1; + pin4=1; + myled3=1; + wait(0.1); + pin1=1; + pin2=0; + pin3=0; + pin4=1; + myled4=1; + wait(0.1); + } + + for(i=0;i<=2;i++) + { + myled1=myled2=myled3=myled4=0; + pin1=1; + pin2=0; + pin3=0; + pin4=1; + myled4=1; +wait(0.1); + pin1=0; + pin2=0; + pin3=1; + pin4=1; + myled3=1; +wait(0.1); + pin1=0; + pin2=1; + pin3=1; + pin4=0; + myled2=1; + wait(0.1); + pin1=1; + pin2=1; + pin3=0; + pin4=0; + myled1=1; + wait(0.1); +} + while(1) + { + + myled1=myled2=myled3=myled4=0; + pin1=1; + pin2=1; + pin3=0; + pin4=0; + myled1=1; +wait(0.1); + pin1=0; + pin2=1; + pin3=1; + pin4=0; + + myled3=1; +wait(0.1); + pin1=0; + pin2=0; + pin3=1; + pin4=1; + myled2=1; + wait(0.1); + pin1=1; + pin2=0; + pin3=0; + pin4=1; + + myled4=1; + wait(0.1); + } + + + +}
diff -r 000000000000 -r e3de08a92ba6 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Mar 26 11:04:44 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f \ No newline at end of file