#include <Servo.h>
// create servo object to control a servo
Servo servo1;
const int servo1PotPin =A0;
const int servo1Pin = 3;
int servo1Value;
Servo servo2;
const int servo2PotPin =A1;
const int servo2Pin = 6;
int servo2Value;
Servo servo3;
const int servo3PotPin =A2;
const int servo3Pin = 10;
int servo3Value;
void setup() {
servo1.attach (servo1Pin);
servo2.attach (servo2Pin);
servo3.attach (servo3Pin);
}
void loop () {
servo1Value = analogRead(servo1PotPin);
servo1Value = map(servo1Value, 0, 1023, 0, 180);
servo1.write(servo1Value);
delay(10);
servo2Value = analogRead(servo2PotPin);
servo2Value = map(servo2Value, 0, 1023, 0, 180);
servo2.write(servo2Value);
delay(10);
servo3Value = analogRead(servo3PotPin);
servo3Value = map(servo3Value, 0, 1023, 0, 180);
servo3.write(servo3Value);
delay(10);
}