     Udp.endPacket();
   }
   if (CameraMoving){
-    if (String(packetBuffer).equals("Cup")){
+    if (String(packetBuffer).equals("Cup") && ServoAngV < 180){
         ServoAngV += 1;
       }
-      else if (String(packetBuffer).equals("Cdown")){
+      else if (String(packetBuffer).equals("Cdown") && ServoAngV > 0){
         ServoAngV -= 1;
       }
-      else if (String(packetBuffer).equals("Cright")){
+      else if (String(packetBuffer).equals("Cright") && ServoAngH < 180){
         ServoAngH += 1;
       }
-      else if (String(packetBuffer).equals("Cleft")){
+      else if (String(packetBuffer).equals("Cleft") && ServoAngH > 0){
         ServoAngH -= 1;
       }
       ServoHorizontal.write(ServoAngH);
-      ServoHorizontal.write(ServoAngV);
-      
-      Serial.println(ServoAngH);
+      ServoVertical.write(ServoAngV);
+      
+      Serial.println(ServoAngV);
   }
 }

  //4 left
  
  switch (dir){
    case (1):
      //avancer
      digitalWrite(MD1,LOW);

void setup() {
  Serial.begin(9600);
  
  ServoVertical.attach(15);
  ServoHorizontal.attach(14);
  //servos must be powered by 3.3v on arduino
  //otherwise it could crash the wifi shield
  
  ServoHorizontal.write(ServoAngH);
  ServoVertical.write(ServoAngV);
  
  pinMode(MD1,OUTPUT);
  pinMode(MD2,OUTPUT);
