Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of All-15 by
Diff: main.cpp
- Revision:
- 13:2100fbde6d34
- Parent:
- 12:070fc8ec44b6
- Child:
- 14:7560cbb335f1
diff -r 070fc8ec44b6 -r 2100fbde6d34 main.cpp --- a/main.cpp Tue Jul 07 22:18:42 2015 +0000 +++ b/main.cpp Tue Jul 07 22:31:37 2015 +0000 @@ -66,7 +66,7 @@ { enable = 1; online = 1; - if((myline==0)&&(linecenter==0)) + if((myline==0&&linecenter==0)||(myline==15&&linecenter==15)) { active = false; MotorL_EN = 0; @@ -90,11 +90,11 @@ MotorR_FORWARD = 1; if((myline&0x02)>0) { - MotorR_EN=0.25; + MotorR_EN=0.10; output=output&(~0x40); } else - MotorR_EN=0.5; + MotorR_EN=0.25; } if((myline&0x08)>0) @@ -108,11 +108,11 @@ MotorL_FORWARD = 1; if((myline&0x04)>0) { - MotorL_EN=0.25; + MotorL_EN=0.10; output=output&(~0x20); } else - MotorL_EN=0.5; + MotorL_EN=0.25; } myled=myline; i2c.start(); @@ -141,6 +141,9 @@ enable = 1; online = 1; wait(0.5); + if(myline==15&&linecenter==15) + myrgb=0; + else if((myline>=1)||(linecenter==1)) { active=true;