View Single Post
  #2   Spotlight this post!  
Unread 06-02-2010, 19:23
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,521
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
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.