|
Re: Using xbox thumbstick to control servos on pan/tilt
Greg's first snippet is probably what you want.
The constant going into the multiply should be changed based on how quickly you want the servo to be able to move when the joystick is at full travel. If you make it 0.001, it will take at least a thousand loops of the code to pan all the way from one side to the other. In teleop, at 50 Hz or 20 ms per loop, that's a very long 20 seconds.
|