View Single Post
  #1   Spotlight this post!  
Unread 08-02-2016, 17:40
dukeeagle dukeeagle is offline
Registered User
FRC #4511
 
Join Date: Feb 2016
Location: Twin Cities, Minnesota
Posts: 1
dukeeagle is an unknown quantity at this point
Talon SRX Encoder

We are trying to figure out how to get the number of rotations on our encoder through our CANTalon.
The FRC website offers a solution if you use the Encoder class, but we are doing it through the wpilib CANTalon class.
Here's what we have so far:
Code:
	  CANTalon frontLeft = new CANTalon(RobotMap.frontLeft);

          public encoder(){
		frontLeft.changeControlMode(ControlMode.Position);
		frontLeft.setFeedbackDevice(FeedbackDevice.QuadEncoder);
		frontLeft.setPID(0.5, 0.001, 0.0);
		frontLeft.enableControl();
	}
Is there a way to do this through the CANTalon class? Help is much appreciated.
Reply With Quote