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.
Revision 6:550027985c6c, committed 2016-10-13
- Comitter:
- csellier
- Date:
- Thu Oct 13 22:01:56 2016 +0000
- Parent:
- 5:40033f403d50
- Child:
- 7:5da0ff9752d5
- Commit message:
- Update Collision Avoidance program only
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Oct 11 22:04:14 2016 +0000 +++ b/main.cpp Thu Oct 13 22:01:56 2016 +0000 @@ -45,13 +45,16 @@ ServoRight.write(0.5); //turn right ServoLeft.write(0.4); } else { - // turn left + ServoRight.write(0.6) // turn left + ServoLeft.write(0.5) } } else if (left > DISTANCE) { if (right < DISTANCE) { - // right + ServoRight.write(0.5) // right + ServoLeft.write(0.4) } else { - // forward + ServoRight.write(0.6) // forward + ServoLeft.write(0.4) } } @@ -59,7 +62,7 @@ LEDleft=1; LEDright=1; - // sernd the servo command to the servos themselves + // send the servo command to the servos themselves ServoRight.write(0.6); // write to the continuous rotation servo1 ServoLeft.write(0.4); // write to the continous servo2