**
Dependencies: mbed
Revision 0:ab5b549988fc, committed 2015-10-09
- Comitter:
- knut_johan
- Date:
- Fri Oct 09 15:08:08 2015 +0000
- Commit message:
- l?reboka
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 ab5b549988fc main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Oct 09 15:08:08 2015 +0000 @@ -0,0 +1,23 @@ +#include "mbed.h" +DigitalOut myled(LED1); +DigitalOut yourled(LED4); + +int main() +{ + char i=0; + while(1) { //starter evig loop + while(i<10) { //starter første loop + myled=1; + wait(0.2); + myled=0; + wait(0.2); + i=i+1; } //slutter første loop + + while(i>0) { //starter andre loop + yourled=1; + wait(0.2); + yourled=0; + wait(0.2); + i=i-1; } //slutte andre loop + } //slutter evig loop +} // end main
diff -r 000000000000 -r ab5b549988fc mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Oct 09 15:08:08 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/34e6b704fe68 \ No newline at end of file