Servo programming difficulty

Hello, I would like some mathematical guidance.

I want a servo to move from Right to Left while i input position between 0 to 180 degrees.
However ,my servo moves the wrong way.

For instance, when it gets the value 0 i want it to be at the RIGHT position , while its in the left , and when it gets 180 value I want it to be at LEFT

please give me some information , thank you

180 - x

Turn it upsidedown!.

Mark

turning it upside still it works counter-clockwise.
and about 180-x it still does.

I want at input value 0, the servo position to be 180
input value 1, the servo position to be 179
input value 2, the servo position to be 178
input value 3, the servo position to be 177
input value 180, the servo position to be 0

i could make 180 if {} but thats not correct :confused:

180 - x

What's the problem?

dam you're right..........
i thought ive test that before but ... it seems I didnt
Thanks a lot !!