#include <Servo.h>
Servo myservo1;
Servo myservo2;
Servo myservo3;
int potpin = A0;
int potpinA = A1;
int potpinB = A2;
int val;
int valA;
int valB;
void setup() {
myservo1.attach(3);
myservo2.attach(5);
myservo3.attach(6);
Serial.begin(9600);
}
void loop() {
val = analogRead(potpin);
valA = analogRead(potpinA);
valB = analogRead(potpinB);
val = map(val, 0, 1023, 0, 180);
valA = map(valA, 0, 1023, 0, 180);
valB = map(valB, 0, 1023, 0, 180);
Serial.print("val = ");
Serial.println(val);
myservo1.write(val);
myservo2.write(valA);
myservo3.write(valB);
delay(15);
}