#include <Servo.h>
Servo servo1;
Servo servo2;
int potPin = A0;
void setup() {
servo1.attach(9);
servo2.attach(10);
}
void loop() {
int potValue = analogRead(potPin);
int angle1 = map(potValue, 0, 1023, 0, 180);
int angle2 = map(potValue, 0, 1023, 180, 0);
servo1.write(angle1);
servo2.write(angle2);
delay(15);
}