Here is an unexpected problem...
When asking the program to return what is on Analog 0 of the Mega, like this:
Serial.println(potPin1); and potPin1 = A0;
it reports back the number 54. Since I am using a Mega, I have 15 Analog ports and I want them all to report back their proper numbers (A0,A1, etc).
That would make this segment of the code kind of cumbersome. Is there a better way to do this?
else if (menu == 'b' || menu == 'B') {
Serial.println ("PotControl Gives You Analog Potentiometer Control using");
Serial.print ("the Potentiometer connected to ");
if (potPin1 == 54){
Serial.print ("A0 (ServoPan on Digital Pin ");
Serial.print (servoPin1);
}
if (potPin1 == 55){
Serial.print ("A1");
}
if (potPin1 == 56){
Serial.print ("A2");
}
Serial.print (" or ");
if (potPin2 == 55){
Serial.print ("A1");
}
Serial.println (" on the Arduino.");
so far there are only two servos. Also, is there a way to concatenate the Serial.println to include a string + a variable? Thanks!