#include <Servo.h>
Servo servo1;
Servo servo2;
Servo servo3;
Servo servo4;
Servo servo5;
const int potPin1 = A0;
const int potPin2 = A1;
const int potPin3 = A2;
const int potPin4 = A3;
const int potPin5 = A4;
const int servoPin1 = 3;
const int servoPin2 = 5;
const int servoPin3 = 9;
const int servoPin4 = 10;
const int servoPin5 = 11;
void setup() {
servo1.attach(servoPin1);
servo2.attach(servoPin2);
servo3.attach(servoPin3);
servo4.attach(servoPin4);
servo5.attach(servoPin5);
}
void loop() {
int val1 = analogRead(potPin1);
int val2 = analogRead(potPin2);
int val3 = analogRead(potPin3);
int val4 = analogRead(potPin4);
int val5 = analogRead(potPin5);
val1 = map(val1, 0, 1023, 0, 180);
val2 = map(val2, 0, 1023, 0, 180);
val3 = map(val3, 0, 1023, 0, 180);
val4 = map(val4, 0, 1023, 0, 180);
val5 = map(val5, 0, 1023, 0, 180);
servo1.write(val1);
servo2.write(val2);
servo3.write(val3);
servo4.write(val4);
servo5.write(val5);
delay(15);
}