#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(11);
myservoB.attach(10);
myservoC.attach(9);
myservoD.attach(6);
}
void loop() {
// put your main code here, to run repeatedly:
valA = analogRead(potpinA);
valA= map(valA, 0, 1023, 0, 90);
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, 90);
myservoC.write(valC);
delay(15);
valD = analogRead(potpinD);
valD = map(valD, 0, 1023, 0, 90);
myservoD.write(valD);
delay(15);
}