Michael Romain
/
Shitty_figure8
Framework for doing the figure 8 track.
Diff: main.cpp
- Revision:
- 2:a04e2757d372
- Parent:
- 1:55e0aaf71bda
- Child:
- 3:e867c4e984df
diff -r 55e0aaf71bda -r a04e2757d372 main.cpp --- 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){