 #include <Servo.h>
 
 int thetaPin[] = {3,5,6,9,10,11};
+int lowerLimit[] = {0,0,0,0,0,16};
+int upperLimit[] = {180,180,120,120,60};
 const int numberOfMotors = 6;
 //We define a servo instance for each motor
 Servo thetaServo[numberOfMotors];

  for (int i = 0; i < numberOfMotors; i++) {
    thetaServo[i].attach(thetaPin[i]);
  }
  for (int i = 0; i < numberOfMotors; i++) {
    thetaServo[i].write(0);
  }
}
int Angle;
void loop() {

   int servoNo = Serial.readStringUntil(' ').toInt();
   if (servoNo < numberOfMotors) {
     Angle = Serial.readStringUntil(':').toInt();
     if (Angle < lowerLimit[servoNo]) {
      thetaServo[servoNo].write(lowerLimit[servoNo]);
     } else if (Angle > upperLimit[servoNo]) {
      thetaServo[servoNo].write(upperLimit[servoNo]);
     } else {
      thetaServo[servoNo].write(Angle);
     }
//     Serial.print("Theta ");
//   Serial.print(servoNo);
//   Serial.print(" Was sent an angle of ");
