bozicne lampice
Revision 0:ca759f0c6bac, committed 2021-11-30
- Comitter:
- zdenko12
- Date:
- Tue Nov 30 20:34:52 2021 +0000
- Commit message:
- Bozicne lampice
Changed in this revision
flasher.cpp | Show annotated file Show diff for this revision Revisions of this file |
flasher.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r ca759f0c6bac flasher.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/flasher.cpp Tue Nov 30 20:34:52 2021 +0000 @@ -0,0 +1,21 @@ +#include<mbed.h> +#include"flasher.h" + +DigitalOut yellowled(D4); +DigitalOut redled(D5); +DigitalOut greenled(D6); + +void bozicnelampice() { // funkcija + redled = 1;// crvena lampica upaljena + greenled = 0;// zelena lampica ugašena + yellowled = 0;//zuta lampica ugašena + wait(0.2); + redled = 0; + greenled = 1; + yellowled = 0; + wait(0.2); + redled = 0; + greenled = 0; + yellowled = 1; + wait(0.2); + }
diff -r 000000000000 -r ca759f0c6bac flasher.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/flasher.h Tue Nov 30 20:34:52 2021 +0000 @@ -0,0 +1,11 @@ +#ifndef FLASHER_H +#define FLASHER_H + +extern DigitalOut yellowled; +extern DigitalOut redled; +extern DigitalOut greenled; + +void bozicnelampice(); + + +#endif \ No newline at end of file