Adam Stanić
/
LV1ZAD3
Laboratorijska vjezba 1 Zadatak 3 Adam Stanic , Alen Sjenicaku
Revision 0:5a68fc8a93eb, committed 2016-03-07
- Comitter:
- 2016US_AdamStanic
- Date:
- Mon Mar 07 21:44:54 2016 +0000
- Commit message:
- Laboratorijska vjezba 1 Zadatak 3 Adam Stanic , Alen Sjenicaku
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 5a68fc8a93eb main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Mar 07 21:44:54 2016 +0000 @@ -0,0 +1,51 @@ +#include "mbed.h" +#define dp23 P0_0 + + + + +DigitalOut enable(dp14); + + + +BusOut bus (dp23, dp24, dp25, dp26, dp27, dp5, dp6, dp28); + +DigitalIn ulaz(dp1); + + +int main() { + enable=0; + + while(1) + { + + bool istina=false; + bus=0; + + for(int i=0;i<128;i++) + { + bus=i; + wait(1); + + if(ulaz==1) + { + int j=i; + for(j=i;j>0;j--) + { + bus=j; + wait(1); + if(j==0) + { + istina=true; + i=0; + } + } + if(istina) break; + + } + if(istina) break; + + + } + } + } \ No newline at end of file
diff -r 000000000000 -r 5a68fc8a93eb mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Mar 07 21:44:54 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/87f2f5183dfb \ No newline at end of file