Adam Stanić
/
LV1ZAD2
Lab 1 zadatak 2 Adam Stanic i Alen Sjenicaku
Revision 0:330d407cca14, committed 2016-03-07
- Comitter:
- 2016US_AdamStanic
- Date:
- Mon Mar 07 10:37:49 2016 +0000
- Commit message:
- Lab 1 zadatak 2 Adam Stanic i 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 330d407cca14 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Mar 07 10:37:49 2016 +0000 @@ -0,0 +1,65 @@ +#include "mbed.h" + +DigitalOut crvena(LED_RED); +DigitalOut zelena(LED_GREEN); +DigitalOut plava(LED_BLUE); + + +int main() +{ + crvena=1; + zelena=1; + plava=1; + + + float vrijeme=1; + + while(vrijeme>0.1) + { + crvena=0; + wait(vrijeme); + crvena=1; + wait(vrijeme); + zelena=0; + wait(vrijeme); + zelena=1; + wait(vrijeme); + + plava=0; + wait(vrijeme); + plava=1; + wait(vrijeme); + + vrijeme=vrijeme-0.1; + + } + + vrijeme=0.1; + + crvena=1; + plava=1; + zelena=1; + + + while(1) + { + crvena=0; + wait(vrijeme); + crvena=1; + wait(vrijeme); + zelena=0; + wait(vrijeme); + zelena=1; + wait(vrijeme); + + plava=0; + wait(vrijeme); + plava=1; + wait(vrijeme); + + } + + + + + } \ No newline at end of file
diff -r 000000000000 -r 330d407cca14 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Mar 07 10:37:49 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/87f2f5183dfb \ No newline at end of file