#include <Servo.h>

int pot1;
int pot2;
int pot3; 

Servo servo1;
Servo servo2;
Servo servo3;

void setup() 
{
  Serial.begin(9600);
  pinMode(A0, INPUT);
  pinMode(A1, INPUT);
  pinMode(A2, INPUT);
  servo1.attach(3);
  servo2.attach(4);
  servo3.attach(5);
}

void loop()
 {
  pot1 = analogRead(A0);
  pot1 = map(pot1, 0 ,1023, 500, 2500);
  pot2 = analogRead(A1);
  pot2 = map(pot2, 0, 1023, 500, 2500);
  pot3 = analogRead(A2);
  pot3 = map(pot3, 0, 1023, 500, 2500);

  servo1.writeMicroseconds(pot1);
  servo2.writeMicroseconds(pot2);
  servo3.writeMicroseconds(pot3);

  int pos1 = servo1.read();
  int pos2 = servo2.read();
  int pos3 = servo3.read();

  Serial.print("Pot1: ");
  Serial.print(pot1);
  Serial.print("  ");
  Serial.print("Pos1: ");
  Serial.print(pos1);
  Serial.print("  ");
  Serial.print("Pot2: ");
  Serial.print(pot2);
  Serial.print("  ");
  Serial.print("Pos2: ");
  Serial.print(pos2);
  Serial.print("  ");
  Serial.print("Pot3: ");
  Serial.print(pot3);
  Serial.print("  ");
  Serial.print("Pos3: ");
  Serial.println(pos3);
  delay(50);                      
}