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:
- 10:389c1c4c1f2b
- Parent:
- 9:b627760fd5d9
- Child:
- 11:4084ae1f1be8
diff -r b627760fd5d9 -r 389c1c4c1f2b main.cpp --- a/main.cpp Tue Jul 07 21:42:17 2015 +0000 +++ b/main.cpp Tue Jul 07 21:51:30 2015 +0000 @@ -84,18 +84,32 @@ else { if((myline&0x01)>0) - MotorR_EN=0.0; - else if((myline&0x02)>0) - MotorR_EN=0.25; + { + MotorR_FORWARD = 0; + MotorR_EN=0; + } else - MotorR_EN=0.5; + { + MotorR_FORWARD = 1; + if((myline&0x02)>0) + MotorR_EN=0.25; + else + MotorR_EN=0.5; + } if((myline&0x08)>0) - MotorL_EN=0.0; - else if((myline&0x04)>0) - MotorL_EN=0.25; + { + MotorL_EN=0; + MotorL_FORWARD = 0; + } else - MotorL_EN=0.5; + { + MotorL_FORWARD = 0; + if((myline&0x04)>0) + MotorL_EN=0.25; + else + MotorL_EN=0.5; + } } myrgb=3; }