Ivan Istuk
/
TVZ_MU2013_Zadatak8
V0.1
Fork of TVZ_MU2013_Zadatak8 by
Revision 3:2b2b4a6add0e, committed 2014-02-24
- Comitter:
- iistuk
- Date:
- Mon Feb 24 12:46:16 2014 +0000
- Parent:
- 2:5893d8d2b248
- Commit message:
- Evo publisho sam.
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Feb 04 18:55:36 2014 +0000 +++ b/main.cpp Mon Feb 24 12:46:16 2014 +0000 @@ -3,24 +3,28 @@ AnalogIn SenzorL(p15); AnalogIn SenzorD(p16); DigitalOut led1(p5); -DigitalOut led2(p7); +DigitalOut led2(p8); DigitalOut MotorD(p10); DigitalOut MotorL(p11); int main() { enum poz {lijevo, sredina, desno}; - /*poz pozicija; - VentL=1; - wait(5); - VentL=0; - pozicija=desno;*/ + while(1) { - if(SenzorL<0.9) { + MotorD=1; + MotorL=0; + wait(5); + + MotorD=0; + MotorL=1; + wait(5); + + if(SenzorL<0.9) { led1=1; - } + } else led1=0; if(SenzorD<0.9) { led2=1;