View Single Post
  #5   Spotlight this post!  
Unread 24-02-2015, 11:34
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
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.
Reply With Quote