View Single Post
  #1   Spotlight this post!  
Unread 03-02-2009, 00:35
Mr.Macdonald Mr.Macdonald is offline
Registered User
FRC #2272
 
Join Date: Jan 2009
Location: Conejo Valley Robotics
Posts: 26
Mr.Macdonald is an unknown quantity at this point
Potentiometer and Motor Trouble

I am trying to set up a motor with a potentiometer to act like a servo. I have another potent controlling the desired location. I can make the motor turn one way correctly but it jitters when going the other direction.

The potentiometer on the motor in magnetic and have infinite rotation, the controller in a normal potent.

My algorithm goes as follows.
PHP Code:
pot_0 controller potentiometer
pot_1 
on motor
mot_0 
motor

mot_0
.Set10 int( (pot_0.value() - pot_1.value())/10 )/1024
the 10's allow for error. 1024 is potentiometer max.