Quote:
Originally Posted by JamesBrown
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?