Promjenaq frekvencije ovisno o položaju prekidača
Dependencies: mbed
Revision 0:745a43b3e717, committed 2015-05-08
- Comitter:
- vgregl
- Date:
- Fri May 08 16:55:59 2015 +0000
- Commit message:
- Vje?ba 4 - Tomi?i? -Gregl
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 745a43b3e717 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri May 08 16:55:59 2015 +0000 @@ -0,0 +1,21 @@ +#include "mbed.h" + DigitalIn sw(p5); + DigitalOut greenled (p6); + int main() { + sw.mode(PullUp); +while(1) { + if (sw==0){ + greenled= 1; + wait (5); + greenled = 0; + wait(5); + } + else if (sw==1) { + greenled= 0; + wait (0.2); + greenled = 1; + wait(0.2); + } + } + } + \ No newline at end of file
diff -r 000000000000 -r 745a43b3e717 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri May 08 16:55:59 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/8ab26030e058 \ No newline at end of file