tim007 tim007
/
LV1_G1_Tim007_Zad3
Enil Pajić Aida Pločo
main.cpp
- Committer:
- tim007
- Date:
- 2014-03-03
- Revision:
- 0:6095153f7e38
File content as of revision 0:6095153f7e38:
#include "mbed.h" DigitalOut L1(LED1); DigitalOut L2(LED2); DigitalOut L3(LED3); int main() { double x = 0; while(1) { L3 = L2 = 1; L1 = 0; wait(1.5 - x); L1 = 1; L2 = 0; wait(1.5 - x); L2 = 1; L3 = 0; wait(1.5 - x); if (x <= 1.5) x += 0.2; else x = 0; } }