 
 Servo left_motor_controller;
 Servo right_motor_controller;
+int diff_speed = 0; // differential speed is -100..100
+int diff_turn = 0;  // differential turn is -100..100
 
 // Configure motor hardware.
 void setup_motors()

    }
}

///////////////////////////////////////////////
// MOTORS


  right_motor_controller.attach(RIGHT_MOTOR_PIN);
  set_motor(LEFT_MOTOR, 0);
  set_motor(RIGHT_MOTOR, 0);
  diff_speed = 0;
  diff_turn = 0;
}

void set_diff_turn(int new_diff_turn)
{
  set_diff_drive(new_diff_turn, diff_speed);
}

void set_diff_speed(int new_diff_speed)
{
  set_diff_drive(diff_turn, new_diff_speed);
}

void set_diff_drive(int turn, int speed)
{
  diff_turn = clamp(turn);
  diff_speed = clamp(speed);
  int right_motor_speed = 0;
  int left_motor_speed = 0;
  if (diff_speed >= 0)
  {
    right_motor_speed = diff_speed - diff_turn;
    left_motor_speed = diff_speed + diff_turn;
  }
  else
  {
    right_motor_speed = diff_speed + diff_turn;
    left_motor_speed = diff_speed - diff_turn;
  }
  set_motor(LEFT_MOTOR, left_motor_speed);
  set_motor(RIGHT_MOTOR, right_motor_speed);
}

// Set a motor to a particular speed, or off.
