DF Robot Shop Motor Commands

If that doesn't work, you might try adjusting the speed of the motors instead of how long the motors run for.

Up in the void loop you initiate the speed of both motors. Interestingly, the left motor is set at speed 250 out of 255 and the right motor is set at 255 out of 255. So if I'm reading this correctly, your right motor is moving faster than the left motor. Not sure if that's intentional because of the chassis, or it your robot is running in circles.

int leftspeed = 250; //255 is maximum speed
int rightspeed = 255;

So what you could do to alter the speed is change leftspeed = [value] and rightspeed = [value] in the switch/case statements.

switch(val) // Perform an action depending on the command
  {
    case 'f'://Move Forward
     leftspeed = 255;
     rightspeed = 255;
     forward (leftspeed,rightspeed);
     break;
    case 'b'://Move Backwards
     leftspeed = 255;
     rightspeed = 255;
     reverse (leftspeed,rightspeed);
     break;
    case 'l'://Turn Left
     leftspeed = 150;    //play with these 150 values until your robot only turns 30 degrees during it's turn left and turn right commands
     rightspeed = 150;  //play with these 150 values until your robot only turns 30 degrees during it's turn left and turn right commands
     left (leftspeed,rightspeed);
     break;
    case 'r'://Turn Right
     leftspeed = 150;    //play with these 150 values until your robot only turns 30 degrees during it's turn left and turn right commands
     rightspeed = 150;  //play with these 150 values until your robot only turns 30 degrees during it's turn left and turn right commands
     right (leftspeed,rightspeed);
     break;
    default:
     stop();
     break;
    case 's'://stop
     halt (leftspeed,rightspeed);
     break;
  }