#include <Servo.h>
#define SERVO_PIN_1 3
#define SERVO_PIN_2 5
#define POT_PIN_1 A0
#define POT_PIN_2 A1
Servo servo1;
Servo servo2;
void setup() {
servo1.attach(SERVO_PIN_1);
servo2.attach(SERVO_PIN_2);
}
void loop() {
int angle1 = map(analogRead(POT_PIN_1), 0, 1023, 0, 180);
int angle2 = map(analogRead(POT_PIN_2), 0, 1023, 0, 180);
servo1.write(angle1);
servo2.write(angle2);
delay(20);
}