Code Example

Link to main loop code
Video A
Video B
//********************************************************
//    Forward Functions
//********************************************************
void forwardFast(int t) {
  LServo.writeMicroseconds(left_forward_fast);
  RServo.writeMicroseconds(right_forward_fast);
  delay(t);
}
void forwardSlow(int t) {
  LServo.writeMicroseconds(left_forward_slow);
  RServo.writeMicroseconds(right_forward_slow);
  delay(t);
}
//********************************************************
//    reverse Function
//********************************************************
void backwardFast(int t) {
  LServo.writeMicroseconds(left_backward_fast);
  RServo.writeMicroseconds(right_backward_fast);
  delay(t);
}
void backwardSlow(int t) {
  LServo.writeMicroseconds(left_backward_slow);
  RServo.writeMicroseconds(right_backward_slow);
  delay(t);
}
//********************************************************
//    TRight Functions
//********************************************************
void rightFast(int t) {
  LServo.writeMicroseconds(left_forward_fast);
  RServo.writeMicroseconds(right_backward_fast);
  delay(t);
}
void rightSlow(int t) {
  LServo.writeMicroseconds(left_forward_slow);
  RServo.writeMicroseconds(right_backward_slow);
  delay(t);
}
//********************************************************
//    TLeft Functions
//********************************************************
void leftFast(int t) {
  LServo.writeMicroseconds(left_backward_fast);
  RServo.writeMicroseconds(right_forward_fast);
  delay(t);
}
void leftSlow(int t) {
  LServo.writeMicroseconds(left_backward_slow);
  RServo.writeMicroseconds(right_forward_slow);
  delay(t);
}
//********************************************************
//    StopBot Function
//********************************************************
void StopBot(int t) {
  LServo.detach();
  RServo.detach();
  delay(t);
  LServo.attach(0);
  RServo.attach(1);
}