Trying to individually control the servos in my robot using keyboard input #include&lt;Servo.h&gt; 
Servo ser1;
Servo ser2;
Servo ser3;
Servo ser4;
Servo ser5;
int poser = 0; 
int val; 
int mot;

void setup() {
  Serial.begin(9600); 
  ser1.attach(4);
  ser2.attach(5);
  ser3.attach(6);
  ser4.attach(7);
  ser5.attach(8);
}

void loop() {
    Serial.print("Choose the motor");
      mot=Serial.read();
      switch(mot)
      {
        case 1:
        {
            val = Serial.read();
            if (val == 'd') 
             {
                poser += 1;
                ser1.write(poser);
               delay(15);
             }
           if (val == 'a') 
             {
                poser -= 1; 
                ser1.write(poser);
                delay(15);
             }
           break;
         }
       case 2:
         {
           val = Serial.read();
           if (val == 'd') 
            {
               poser += 1;
               ser2.write(poser);
               delay(15);
            }
           if (val == 'a') 
            {
               poser -= 1; 
               ser2.write(poser);
               delay(15);
            }
           break;
         }
      case 3:
         {
           val = Serial.read();
           if (val == 'd') 
            {
              poser += 1;
              ser3.write(poser);
              delay(15);
            }
          if (val == 'a') 
            {
              poser -= 1; 
              ser3.write(poser);
              delay(15);
            }
          break;
         }
       case 4:
         {
            val = Serial.read();
            if (val == 'd') 
             {
                poser += 1;
                ser4.write(poser);
                delay(15);
             }
           if (val == 'a') 
             {
                poser -= 1; 
                ser4.write(poser);
                delay(15);
             }
           break;
         }
       case 5:
         {
           val = Serial.read();
           if (val == 'd') 
             {
                poser += 1;
                ser4.write(poser);
                delay(15);
             }
           if (val == 'a') 
             {
                poser -= 1; 
                ser4.write(poser);
                delay(15);
             }
           break;
          }
      default:
          {
              Serial.print("Type valid number");
              break;
          }
    }
  }


The code just shows "Choose the motor type valid number" repeatedly and the arm contorts as soon as I upload it. Can someone please check the code and tell me what could've gone wrong?
I would suggest you to add these line in your code.

while(!Serial.available()){;} before mot = Serial.read();

This will hold you logic till any input received from Serial.

Same you add before val = Serial.read();.