View Single Post
  #3   Spotlight this post!  
Unread 28-03-2008, 15:21
beefy23 beefy23 is offline
Registered User
no team
 
Join Date: Mar 2008
Location: Israel
Posts: 9
beefy23 is an unknown quantity at this point
Re: Question about Gear Sensor

Quote:
Originally Posted by JamesBrown View Post
Quadrature encoders are similar in purpose to gear tooth sensors but are different in functionality. A quadrature encoder has an additional channel that indicates the direction the encoder is being turned.

In Kevin Watson's FRC code the functions like Get_Encoder_1_Count() return the net number of pulses sent by the encoder plugged into the port as declared in the encoder.h file. The numbers are used to distinguish between encoders, I believe Kevin's code allows for 6 to be used at a time.

The value returned by Get_Encoder_1_Count() can be converted into distance traveled since the encoder was last reset by multiplying the value by the ratio of encoder turns to wheel turns then by multiplying by the wheel circumference.
And how do you know which analog input to receive the information?