ok here is an up date. I replaced 2 of the pots. and then i tryed this code again
#include <MegaServo.h>
MegaServo servo1;
MegaServo servo2;
MegaServo servo3;
MegaServo servo4;
int potpin1 = 0; // analog pin used to connect the potentiometer
int potpin2 = 1;
int potpin3 = 2;
int potpin4 = 3;
int val; // variable to read the value from the analog pin
void setup()
{
servo1.attach(9); // attaches the servo on pin 9 to the servo object
servo2.attach(10); // attaches the servo on pin 10 to the servo object
servo3.attach(11); // attaches the servo on pin 9 to the servo object
servo4.attach(8); // attaches the servo on pin 10 to the servo object
}
void loop()
{
val = analogRead(potpin1);
val = map(val, 0, 1023, 0, 179);
servo1.write(val);
val = analogRead(potpin2);
val = map(val, 0, 1023, 179, 0);
servo2.write(val);
val = analogRead(potpin3);
val = map(val, 0, 1023, 0, 179);
servo3.write(val);
val = analogRead(potpin4);
val = map(val, 0, 1023, 0, 179);
servo4.write(val);
delay(15);
}
it works.........................but i dont know why but 2 of the servos sake a little for then i would like. but there is no bleeding over as far as i can tell. The only different on the pots is that the ones i was using before were big and the ones im using now are little. i dont know if that maters or what, but something is different. any thoughts on this?