GORE:
Well lets begin with the constrain- why constrain? I'm not looking to limit values, i still want to use the full range of motion of the servos as well as the pot. That is why I used the map function in my original code.
The constrain() is there to keep your angles from going below 0 or above 180. Did you want to use angles outside the normal range of a servo? I didn't think so.
GORE:
Also, while running the code in my head I noticed that if the pot read less that 512 the int X/YpotVal would be a negative number, isn't this undesirable and non-functional?
You want the angle to change relative to it's current position. If you didn't allow negative motion you would hit the upper limit and stay there forever. Also, since you did not specify the centered values of your pot I had to assume it was 512. You should actually measure and use those values. If they are far off from 512 that would explain why your servos move to one corner.
GORE:
And why the difference in scale values? I assumed the difference was simply a typo, but did also compile it with these values in the interest of running the code as provided.
It was a typo. I don't know how sensitive you want your joystick to be. I gave a hint that you could adjust the sensitivity by changing those values.
GORE:
What would have proved more helpful is a description along with the code you provided. I assume the code was to be applied as such, and it did compile correctly.
If I told you why I was doing everything there would be less room for learning.
Change:
int servoAngleX = constrain(servoAngleX + (XpotVal/XpotSpeed), 180, 0);
int servoAngleY = constrain(servoAngleY + (YpotVal/YpotSpeed), 180, 0);
to
servoAngleX = constrain(servoAngleX + (XpotVal/XpotSpeed), 180, 0);
servoAngleY = constrain(servoAngleY + (YpotVal/YpotSpeed), 180, 0);
and then add the declarations outside of loop():
int servoAngleX, servoAngleY;
This makes the declarations "Global" so they maintain their value between runs of loop();