Thread: Encoder
View Single Post
  #5   Spotlight this post!  
Unread 18-02-2015, 12:45
legts legts is offline
Autonomous Queen
FRC #2399 (The Fighting Unicorns)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2012
Location: Ohio
Posts: 73
legts is an unknown quantity at this point
Re: Encoder

What our electrical team did was they wired optical encoders onto the axel and into the jag. Inside of the DriveTrain subsystem, I called a method on each of the jags to inform them that they have encoders. That portion of code looked like this:
Quote:
rightFront.setPercentMode(CANJaguar.kQuadEncoder, encoderCounts);
Below that, I enabled encoder control on each of the jags:
Quote:
rightFront.enableControl();
I was then able to use the encoders in other programs.

I wouldn't know without looking at the javadocs, but if I were to make an educated guess I would say that setting up encoders would be similar to this but with talons instead of jaguars.
Reply With Quote