*****
Dependencies: mbed
Revision 0:b34c8e79762b, committed 2015-10-09
- Comitter:
- knut_johan
- Date:
- Fri Oct 09 15:10:23 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 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Oct 09 15:10:23 2015 +0000 @@ -0,0 +1,24 @@ +#include "mbed.h" + +DigitalOut redled(PA_5); +DigitalOut greenled(PA_6); +DigitalIn switchinput(PB_7); + +int main() +{ while(1) { // while loop + if(switchinput==1) { // if loop + redled=1; + greenled=0; + wait(0.5); + redled=0; + wait(0.5); + } // end if loop + else { // else loop + greenled=1; + redled=0; + wait(0.5); + greenled=0; + wait(0.5); + } // end else loop + } // end while loop +} // end main \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Oct 09 15:10:23 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/34e6b704fe68 \ No newline at end of file