 
 String inputString = "";         // a string to hold incoming data
 boolean stringComplete = false;  // whether the string is complete
+Timer t;
 
 void setup()
 {

      case 'd':
      // Stopping
      Serial.println("Stop");
      drive(0,0,0);
      break;
    }
  }


void loop()
{
  t.update();
}

// Drive left and right wheel motors for dt milliseconds, blocking
void drive(int vl, int vr, int dt_millis) {
  motors.setLeftSpeed(vl);
  motors.setRightSpeed(vr);
  t.after(dt_millis, drive_stop);
}

// Stops motors
void drive_stop() {
  motors.setLeftSpeed(0);
  motors.setRightSpeed(0);
}
