[SOLVED] X- Y- Laser Control with Joystick, Absolute vs. Incremental movement

johnwasser:
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?

No Johnwasser. What I am saying is that I would also like to use the full range of the potentiometers also. Hence, not barring any value from either- what I tried to do was write code that output values from 0 to 180, because If i tell the servo to write to 0, it will write to the furthest right position, 180, left. What I dont want is a "dead-zone" in the pot where I can move it but not the servo.

johnwasser:
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.

Well, the code that I have been experimenting with involves the general direction and magnitude of the pot, then subtracting or adding a value derived from the magnitude of direction. 90 to 85 to 80, etc. No negative readings need to be written to the servo. This is what I meant.

johnwasser:
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.

I did, and I accounted for any difference. It is not the reason. The code ONLY outputs 180. Moving the pots does nothing, even on startup.
And what I meant by an explanation was that any words would have been more useful than nothing, and there could still be room for learning.

Yes, mirith, thats the idea that I ended up trying to act on. I concluded that I needed to know that value at all times too. And yes your example of negative numbers is what I understand should be. What shouldn't is negative numbers being written to the servo. That is what I don't want. Thanks to you both, I will work on the code later.