|
Re: Using xbox thumbstick to control servos on pan/tilt
Like Alan, I'm not sure what you want, but here are the two things I'd suggest.
1. Instead of setting the servo to the X and Y values of the joystick, use them to increment the value of the servo. You'll want to have a shift register that is initialized to zero, and add a fraction of the joystick each time through the loop. Send that to the servos.
2. Only update the servo value based on a button.
I'm also testing to see if the code snippets work when attached like this, but they should at least show you what the code should look like.
Greg McKaskle
|