               int intensity = map(input_buffer.substring(2, 4).toInt(), 0, 100, 0, 255);
               int period;
               if (intensity) {
-                period = input_buffer.substring(5, last_char - 1).toInt();
+                period = input_buffer.substring(5, last_char).toInt();
               } else {
                 period = 0; 
               }

#define PIN_MOTOR_B_INPUT_1 30
#define PIN_MOTOR_B_INPUT_2 32

const int motor_speed_max = 200;
int motor_speed_now = 0;
String input_buffer = "";


  is_moving = true;
  is_rotation = true;
  is_forward = right;
  previous_millis_moving = millis();
}
void robotStop(){ 
  analogWrite(PIN_MOTOR_A_ENABLE, 0); 
