Matija Pozojevic
/
Vjezba5_MatijaPozojevic
Matija Pozojević
Revision 0:0709567c9017, committed 2015-05-08
- Comitter:
- mpozojevi
- Date:
- Fri May 08 16:52:26 2015 +0000
- Commit message:
- Matija Pozojevi?
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 0709567c9017 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri May 08 16:52:26 2015 +0000 @@ -0,0 +1,26 @@ +#include "mbed.h" + +DigitalOut myled(LED1); +DigitalIn sw1(p7); + +int i = 0; + + +int main() +{ + sw1.mode(PullUp); + while(i<9) { + if (sw1==1) { + i++; + while (sw1==1) + {} + } + wait(0.2); /// zbog istitravanja prekidaća + if (sw1==0) { + while (sw1==0) + {} + } + + } + myled = 1; +}
diff -r 000000000000 -r 0709567c9017 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri May 08 16:52:26 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/8ab26030e058 \ No newline at end of file