Trying to individually control the servos in my robot using keyboard input
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();.