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.
Dependencies: mbed
Fork of Shitty_figure8 by
Diff: main.cpp
- Revision:
- 2:a04e2757d372
- Parent:
- 1:55e0aaf71bda
- Child:
- 3:e867c4e984df
--- a/main.cpp Fri Mar 20 10:18:20 2015 +0000
+++ b/main.cpp Fri Mar 20 10:33:58 2015 +0000
@@ -300,24 +300,24 @@
if(approxPos > 0 && approxPos <= 25){
servo.pulsewidth(hardLeft);
- motor1.pulsewidth(.0025*.095);
- motor2.pulsewidth(.0025*.095);
+ motor1.pulsewidth(.0025*.1);
+ motor2.pulsewidth(.0025*.1);
} else if (approxPos > 25 && approxPos <= 40){
servo.pulsewidth(slightLeft);
- motor1.pulsewidth(.0025*.1);
- motor2.pulsewidth(.0025*.1);
+ motor1.pulsewidth(.0025*.105);
+ motor2.pulsewidth(.0025*.105);
} else if (approxPos > 40 && approxPos <= 90){
servo.pulsewidth(straight);
- motor1.pulsewidth(.0025*.105);
- motor2.pulsewidth(.0025*.105);
+ motor1.pulsewidth(.0025*.1125);
+ motor2.pulsewidth(.0025*.1125);
} else if (approxPos > 90 && approxPos <= 105){
servo.pulsewidth(slightRight);
+ motor1.pulsewidth(.0025*.105);
+ motor2.pulsewidth(.0025*.105);
+ } else if (approxPos > 105 && approxPos <= 128){
+ servo.pulsewidth(hardRight);
motor1.pulsewidth(.0025*.1);
motor2.pulsewidth(.0025*.1);
- } else if (approxPos > 105 && approxPos <= 128){
- servo.pulsewidth(hardRight);
- motor1.pulsewidth(.0025*.095);
- motor2.pulsewidth(.0025*.095);
}
/*
if(approxPos > 0 && approxPos <= 45){
