PS3 controller joystick with servo

Hi,

I am building a robotics arm and I am struggling on the programming part.
I am using the usb host shield, and it's PS3BT library, an arduino uno, a bluetoothdongle and a sensor shield v5.0

I am a fairly new beginner at programming, and I seriously need help proframing the servo so that it would correspond to the PS3 left joystick in relation of the x axis. This is going to be for the base servo. I want the servo to move to the right when I go to the right on the joystick and stay there, and I want the servo go to the left when the joystick goes to the left and stay there.

I don't want the servo to be back to center as soon as the joystick comes back to the middle, original position(127)

Please help!! It's for a big project. Anything would be much appreciated! Thank you

I want the servo to move to the right when I go to the right on the joystick and stay there, and I want the servo go to the left when the joystick goes to the left and stay there.

You need to determine how you will ever get the servo to move clockwise after it moves counterclockwise, or to move counterclockwise after it moves clockwise.

Making the servo follow the joystick's absolute position while a switch is pressed, and not follow it when the switch is not pressed is easy. Making the servo move relative to where it is as the joystick moves is only slightly more complicated, if the servo moves only when a switch is pressed.

Making the servo sometimes follow the joystick and sometimes not, with no other input, is impossible.