Increment servo with joystick?

I'm trying to make a pan/tilt system, but im having zero luck. I have everything hooked up right(I think), trying to make it so when i move the joystick right, the servo rotates right. When I let go, I want the servo to stop in place, not bounce back. Also, right now whether I move the joystick left or right, the servo moves to the left. Whut.

valX = analogRead(joyX);            
  if(valX>520) valX++;
  if(valX<450) valX--;
  if(valY>520) valY++;
  if(valY<480) valY--;
  
  baseS.write(valX);
  delay(50);

Your code snippet is poorly written. Try this:

valX = analogRead(joyX);

baseS.write(map(valX,0,1023,0,180));

I think the code in this Thread does what you want.

...R