I am trying to build a small robot using an Arduino Duemilanove ATmega328 and Arduino 0017. Everything works fine until I try to attach a third servo (I would like to use at least 5 servos). With just two servos attached a simple program like the one below works without any noticeable problems. However, once the third servo is attached (servo3 in code below), the two other servos behave seemingly random, not following the instructions at all.
This problem also occurs if i use the MegaServo library or when I tried an alternative pin setting.
In the following example servo1 and servo2 are continous servos. This code produces the strange behavior, once line 18 ("servo3.attach(PINS3);") is commented out it runs fine.
const int PINS1 = 3;
const int PINS2 = 11;
const int PINS3 = 6;
servo3.attach(PINS3); // this line causes trouble
// turn one way for 4s
// stop for 4s
// turn the other way
// stop again
Any help is appreciated! Happy holidays!