View Single Post
  #5   Spotlight this post!  
Unread 17-01-2016, 21:09
curtis0gj curtis0gj is offline
Registered User
FRC #5033 (Beavertronics)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Canada
Posts: 121
curtis0gj will become famous soon enough
Re: Using Encoder to Drive a Certain Distance

Quote:
Originally Posted by Joe Ross View Post
You should use 360 pulses in a full revolution, but it will increment in 1/4 increments in 4x mode. In addition, you'll want to take into account any gearing between the encoder and the wheel.

Code:
    public static final double encoderGearRatio = 3;
Thanks so much this helped clarify things greatly. I just have two questions. First, I am trying to figure out if I should be using the k4x or k1x I am not sure I understand that 1/4 increments part you were speaking about. I was wondering if I needed to use k4x or k1x for this math. Second, I am trying to figure out what the encoderGearRatio double is for. Does it have to do with the shaft the encoder is mounted on. Thanks.
Reply With Quote