|
Re: wiring and programing our optical encoders
WPILIB provides an encoder class (I believe) that can be used with the encoders.
It should count in "ticks". Not degrees. So you'll have to find out how many "ticks" are in one revolution of your encoder, and use that to convert to degrees.
In addition, the encoders are not "absolute" encoders. They do not have a zero-position that stays the same. Essentially, every time you fire up your code the zero will be in a different location. So if you are trying to use the encoders for absolute positioning, you either have to buy an absolute positioning encoder, make sure you set your mechanism in the same location every time and then zero it, or use a potentiometer suited to the application.
|