#include<Servo.h>
Servo myservoA;
Servo myservoB;
Servo myservoC;
Servo myservoD;
int potpinA = A0;
int potpinB = A1;
int potpinC = A2;
int potpinD = A3;
int valA;
int valB;
int valC;
int valD;
void setup() {
// put your setup code here, to run once:
myservoA.attach(3);
myservoB.attach(5);
myservoC.attach(9);
myservoD.attach(10);
}
void loop() {
// put your main code here, to run repeatedly:
valA = analogRead(potpinA);
valA = map(valA, 0, 1023, 0, 45);
myservoA.write(valA);
delay(15);
valB = analogRead(potpinB);
valB = map(valB, 0, 1023, 0, 90);
myservoB.write(valB);
delay(15);
valC = analogRead(potpinC);
valC = map(valC, 0, 1023, 0, 135);
myservoC.write(valC);
delay(15);
valD = analogRead(potpinD);
valD = map(valD, 0, 1023, 0, 180);
myservoD.write(valD);
delay(15);
}