Moving three servos together

I want to move three servos together at the same time. I want the action to be that when you flip a switch, the three servos together move from 0 degrees to 180, then when the switch is flipped again the servos all move back from 180 degrees to 0 degrees. I am using an arduino uno with a SparkFun PWM Shield It will have a 12 volt - 3 amp supply connected to it, over kill but I LIKE THE POWER! I just need some help with this because so far from what I have seen, everyone else can only run one servo at a time. No multi-threading.

I have looked at using this Library for the code. It is the library related to the shield. Thanks everyone!

EDIT: Will connecting multiple servos to one PWM damage the arduino? Having separate VCCs for them though, so the only common pin between them would be the actual PWM pin to the board.

Feed the same PWM signal to all three servos.

MK1888: Feed the same PWM signal to all three servos.

This so lacks imagination. :)

KenF: This so lacks imagination. :)

Add Bluetooth.

Another alternative would be to only supply power to one of the servos, then connect the others with string.

you gotta be able to control more than one servo at a time, howelse do the quadcopters fly?

MK1888: Feed the same PWM signal to all three servos.

:o RIGHT. Shhhhh.....

Simple servo button code.

//zoomkat servo button test 7-30-2011
//Powering a servo from the arduino usually *DOES NOT WORK*.

#include <Servo.h>
int button1 = 4; //button pin, connect to ground to move servo
int press1 = 0;
Servo servo1;

void setup()
{
  pinMode(button1, INPUT);
  servo1.attach(7);
  digitalWrite(4, HIGH); //enable pullups to make pin high
}

void loop()
{
  press1 = digitalRead(button1);
  if (press1 == LOW)
  {
    servo1.write(160);
  }
  else {
    servo1.write(20);
  }
}

you gotta be able to control more than one servo at a time, howelse do the quadcopters fly?

Motors

Mark

holmes4: Motors

Mark

motors are controled by esc's which are controled by servo control logic, duhhh

One way to do this is to move the servos in small increments - a degree at a time for example. Then, although they won't necessarily move at exactly the same time, it will appear that they are.