servo.h dosen't work to control 6 servos

Hi people,

I'm having problem with the library servo.h. I'm setting the library to control 6 servos and always one of the pins doesn't control the servo...
I can't understand what is happening, I've already changed the pins used to control the servos, but it has no effect...

I'm setting the position of all servos to 0º, so I connect a servo with the arm in another position, it should put the servo's arm to the 0º position, and it only doesn't work to the pin 13.

Does anyone have any clue about what is happening?

Above the code setting the servo.h:

/* Library to use I2C */
#include <Wire.h>

/* I2C configurations */
#define ADRRESS 0x30

#include <Servo.h>

/* Servos */
#define S1Y         2
#define S1P         3
#define S2Y         4
#define S2P         7
#define SB1         8
#define SB2         13

/* Motors */
#define M1          5
#define M2          6

/* Sensors */
#define P1ALIVE     11
#define P2ALIVE     12

/* Servos */
Servo s1y, s1p, s2y, s2p, b1, b2;

void setup()
{
    /* I2C Setup */
    Wire.begin(ADRRESS);
    Wire.onRequest(sendData);
    Wire.onReceive(receiveData);

    /* Servos */
    s1y.attach(S1Y);
    s1p.attach(S1P);
    s2y.attach(S2Y);
    s2p.attach(S2P);
    b1.attach(SB1);
    b2.attach(SB2);

    /* Sensors */
    pinMode(P1ALIVE, INPUT_PULLUP);
    pinMode(P2ALIVE, INPUT_PULLUP);
    pinMode(9, OUTPUT);
    pinMode(10, OUTPUT);

    /* Motors */
    pinMode(M1, OUTPUT);
    pinMode(M2, OUTPUT);

    /* Set servos positios to zero */
    s1y.write(0);
    s1p.write(0);
    s2y.write(0);
    s2p.write(0);
    b1.write(0);
    b2.write(0);
}

Have you tested pin13 is working from digitalWrite? (it should have an LED on it
so this is an easy test). Try checking the voltage from it when LOW and HIGH using
a multimeter.

With some libraries pin 13 is used as a timing pin. Below is some servo test code you can try using pin 13 with to see if the servo works.

// zoomkat 12-25-13 serial servo test
// type servo position 0 to 180 in serial monitor
// or for writeMicroseconds, use a value like 1500
// Send an a to attach servo or d to detach servo
// for IDE 1.0.5 and later
// Powering a servo from the arduino usually *DOES NOT WORK*.

#include <Servo.h> 
String readString; //String captured from serial port
Servo myservo;  // create servo object to control a servo 
int n; //value to write to servo

void setup() {
  Serial.begin(9600);
  myservo.writeMicroseconds(1500); //set initial servo position if desired
  myservo.attach(7, 500, 2500);  //the pin for the servo control, and range if desired
  Serial.println("servo all-in-one test code 12-25-13"); // so I can keep track of what is loaded
  Serial.println();
}

void loop() {
  while (Serial.available()) {
    char c = Serial.read();  //gets one byte from serial buffer
    readString += c; //makes the string readString
    delay(2);  //slow looping to allow buffer to fill with next character
  }

  if (readString.length() >0) {
    Serial.println(readString);  //so you can see the captured string 

      // attach or detach servo if desired
    if (readString == "d") { 
      myservo.detach(); //detach servo
      Serial.println("servo detached");
      goto bailout; //jump over writing to servo
    }
    if (readString == "a") {
      myservo.attach(7); //reattach servo to pin 7
      Serial.println("servo attached");
      goto bailout;
    }    

    n = readString.toInt();  //convert readString into a number

    // auto select appropriate value
    if(n >= 500)
    {
      Serial.print("writing Microseconds: ");
      Serial.println(n);
      myservo.writeMicroseconds(n);
    }
    else
    {   
      Serial.print("writing Angle: ");
      Serial.println(n);
      myservo.write(n); 
    }

bailout: //reenter code loop
    Serial.print("Last servo command position: ");    
    Serial.println(myservo.read());
    Serial.println();
    readString=""; //empty for next input
  }
}

MarkT, I can control without problems the led connected to pin 13...
zoomkat, I didn't try your code because I'm using the Gerduino, and it doesn't have serial connected to the cable as the others arduinos have.

I could get it working using the pin 0 or 1, but I would like they free as the are the pins used to serial communication...
Also if I try pins 9 or 10 it make the servo spin 360º without stop, actually it has just broken one of my servos...

Does anyone know were I can find information about limitations of the servo library, I'm using the one that comes with Arduino's (Servo - Arduino Reference), and as far I understand I'm not doing something wrong...

It does nothing special, as it uses digitalWrite to drive the pins. Its more likely
something else is accessing the same pins.

Does the Gerduino have other stuff connected to any of these pins?