I promised this last evening. Hopefully it will clarify the issue. Pin 14 on a Mega is an actual Digital Pin and is not the same as Pin 14 on the Uno (which is an Analog Pin). Not having the board internals telling the pins their names for Analog, but it working for Digital is a pretty obvious shortcoming. My hope in bringing this up is that it can be put in the Queue for the next IDE update.
int analogPin1 = A0;
bool runOnce = true;
void setup() {
Serial.begin (115200);
}
void loop() {
if (runOnce == true) {
Serial.println("This is with the Analog Pin variable set to A0:");
Serial.print ("This is controlled with the Potentiometer at Pin ");
Serial.println (analogPin1);
runOnce = false;
}
runOnce = true;
Serial.println("\nThis is using the Serial Monitor to user input the Pin");
Serial.print ("Enter desired Analog Pin for Controlling the Pan Servo:");
while(Serial.available()==0) {}
analogPin1 = Serial.parseInt();
Serial.print (" You chose Analog Pin ");
Serial.print (analogPin1);
Serial.println (".\n");
runOnce = false;
}