Thread: Encoder Trouble
View Single Post
  #3   Spotlight this post!  
Unread 01-02-2014, 11:54
sarangmittal's Avatar
sarangmittal sarangmittal is offline
Registered User
FRC #1683 (Techno Titans)
Team Role: Programmer
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Atlanta GA
Posts: 20
sarangmittal is an unknown quantity at this point
Re: Encoder Trouble

Another thing crucial to getting Encoders to work is using the setDistancePerPulse() method.

You experimentally determine this constant by rolling the robot over a pre-determined distance, and recording the number of pulses from the get() method.

Then it's as easy as dividing distance by the number of pulses, and using the setDistancePerPulse() before getting the distance.

Hope this helps.

If this still doesn't work, maybe try posting the code, and we can look it over.