#include <Servo.h>
Servo servos[4];
const int potPins[4] = {A0, A1, A2, A3};
void setup() {
servos[0].attach(9);
servos[1].attach(10);
servos[2].attach(11);
servos[3].attach(12);
}
void loop() {
for(int i = 0; i < 4; i++) {
int valorPot = analogRead(potPins[i]);
int angulo = map(valorPot, 0, 1023, 0, 180);
servos[i].write(angulo);
}
}