Thread: Is it possible?
View Single Post
  #8   Spotlight this post!  
Unread 12-02-2009, 08:55
Luke Pike's Avatar
Luke Pike Luke Pike is offline
Programmer
FRC #1501 (THRUST)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Huntington
Posts: 114
Luke Pike is a name known to allLuke Pike is a name known to allLuke Pike is a name known to allLuke Pike is a name known to allLuke Pike is a name known to allLuke Pike is a name known to all
Re: Is it possible?

The problem is that motors are controlled by speed, while servos are controlled by angle or position. You must have an encoder or some other kind of position sensor on the motor for this to work.

If you have that, you can subtract what the software thinks is the middle point (85 I think). Assuming the motor is pointing straight at the beginning, that is the setpoint for the encoder. If it's negative, turn the motor in that direction and vice versa. Once the encoder gets close enough to the setpoint, stop turning the motor so it doesn't oscillate.
__________________
Twitter Profile
Reply With Quote