     digitalWrite(AMOTOR, HIGH);
     digitalWrite(BMOTOR, HIGH);
 }
-
+*/
+void variable_out(){
+    while(Serial.available () > 2);//wait for the motor speed info
+    motor_speed[0] = Serial.parseInt();//motor A speed
+    motor_speed[1] = Serial.parseInt();//motor B speed
+
+    if(motor_speed[0] > 255){
+      motor_speed[0] = 255;
+    }
+    if(motor_speed[1] > 255){
+      motor_speed[1] = 255;
+    }
+    
+    digitalWrite(DIR_A, LOW);
+    digitalWrite(DIR_B, HIGH);
+
+    digitalWrite(AMOTOR_BRAKE, LOW);
+    digitalWrite(BMOTOR_BRAKE, LOW);
+
+    analogWrite(AMOTOR, motor_speed[0]);
+    analogWrite(BMOTOR, motor_speed[1]);
+}
 void stop_motor(){
     digitalWrite(DIR_A, LOW);
     digitalWrite(DIR_B, LOW);

            case 'w':
              if(command_status == 1){
                //move_forward();
                variable_forward();
              }
              break;
              
            case 'r':
              if(command_status == 1){
                move_reverse();
              }
              break;

            case 'o':
              if(command_status == 1){
                move_out();
              }
              break;          

            case 'i':
              if(command_status == 1){
                move_in();
              } 
              break;
              
            case 'x':
              if(command_status == 1){
                stop_motor();
              }
              break;
              
            case 'u':
              if(command_status == 1){
                noInterrupts();
                us_sensor();
                interrupts();
              }
              break;
              
            case 'n':
              if(command_status == 1){
                servo_info();
              }
              break;
              
            case 't':
              if(command_status == 1){
                servo_top();
              }
              break;
              
            case 'b':
              if(command_status == 1){
                servo_bottom();
              }
              break;
              
            case 'p':
              if(command_status == 1){
                servoH++;  
              }
              break;
              
            case 'e':
              if(command_status == 1){
                servoH--;  
              }
              break;            
            case '9':
              command_status = 1;
              break;
            default:
            break;
          }
      }

    digitalWrite(AMOTOR, HIGH);
    digitalWrite(BMOTOR, HIGH);
}
*/
void variable_in(){
    while(Serial.available () > 2);//wait for the motor speed info
    motor_speed[0] = Serial.parseInt();//motor A speed
    motor_speed[1] = Serial.parseInt();//motor B speed

    if(motor_speed[0] > 255){
      motor_speed[0] = 255;
    }
    if(motor_speed[1] > 255){
      motor_speed[1] = 255;
    }
    
    digitalWrite(DIR_A, HIGH);
    digitalWrite(DIR_B, LOW);

    digitalWrite(AMOTOR_BRAKE, LOW);
    digitalWrite(BMOTOR_BRAKE, LOW);

    analogWrite(AMOTOR, motor_speed[0]);
    analogWrite(BMOTOR, motor_speed[1]);
}
/*
void move_out(){
    digitalWrite(DIR_A, LOW);
    digitalWrite(DIR_B, HIGH);
