 #define RRH_CENTER   90 
 #define RRF_CENTER   90 
 
-#define FLH_MAX   110 
-#define FLF_MAX   110 
+#define FLH_MAX   130 
+#define FLF_MAX   160 
 #define FRH_MAX   130 
 #define FRF_MAX   160
 
-#define RLH_MAX   110 
-#define RLF_MAX   110
-#define RRH_MAX   110 
-#define RRF_MAX   110 
-
-#define FLH_MIN   60 
-#define FLF_MIN   60 
+#define RLH_MAX   130 
+#define RLF_MAX   160
+#define RRH_MAX   130 
+#define RRF_MAX   160 
+
+#define FLH_MIN   50 
+#define FLF_MIN   50 
 #define FRH_MIN   50 
-#define FRF_MIN   60
-
-#define RLH_MIN   60 
-#define RLF_MIN   60
-#define RRH_MIN   60 
-#define RRF_MIN   60 
+#define FRF_MIN   50
+
+#define RLH_MIN   50 
+#define RLF_MIN   50
+#define RRH_MIN   50 
+#define RRF_MIN   50 
  
-#define FLH_PIN 4    // Front Left Hip servo  pin
-#define FLF_PIN 5    // Front Left Foot servo  pin
-#define FRH_PIN 6    // Front Right Foot switch pin
-#define FRF_PIN 7    // Front Right Foot switch pin
-
-#define RLH_PIN 8    // Rear Left Hip switch pin
-#define RLF_PIN 9    // Rear Left Foot switch pin
-#define RRH_PIN 10   // Rear Right Foot switch pin
-#define RRF_PIN 11   // Rear Left Foot switch pin
+#define FLH_PIN 2    // Front Left Hip servo  pin
+#define FLF_PIN 3    // Front Left Foot servo  pin
+#define FRH_PIN 4    // Front Right Foot switch pin
+#define FRF_PIN 5    // Front Right Foot switch pin
+
+#define RLH_PIN 6    // Rear Left Hip switch pin
+#define RLF_PIN 7    // Rear Left Foot switch pin
+#define RRH_PIN 8   // Rear Right Foot switch pin
+#define RRF_PIN 9   // Rear Left Foot switch pin
 
 VarSpeedServo servo_flh;  
 VarSpeedServo servo_flf;

    case 2:
      // Put foot down
      servo_frf.write(FRF_CENTER, 80);
      state = 3;
      // Call this function again later to sweep back
      leg_timer_fr = timer.setTimeout(1000, legFwdFrontRight);
      break;
      
    case 3:
      // Sweep back
      servo_frh.write(FRH_MAX, 20);
      state = 0;
      break;
  }

}




void motionFwd()
{
  static byte state;
  
  switch (state) {
    
    case 0:
      legFwdFrontRight();
      state = 1;
      leg_timer = timer.setTimeout(3000, motionFwd);
      break;
     
    case 1:
      legFwdRearLeft();
      state = 2;
      leg_timer = timer.setTimeout(3000, motionFwd);
      break;
    case 2:
      legFwdCompleteFrontRight();
      legFwdCompleteRearLeft();
      state = 0;
      leg_timer = timer.setTimeout(3000, motionFwd);
      break;
      
  }
  
}

/**
