So I am trying to get a motor to go to a certain position using the encoder provided by US Digital, and am having trouble.
Code:
self.talon = wpilib.CANTalon(15)
self.talon.changeControlMode(CANTalon.ControlMode.Position)
self.talon.setFeedbackDevice(CANTalon.FeedbackDevice.EncFalling) #Not sure if the encode is EncFalling or Quad
self.talon.reverseSensor(True)
self.talon.setP(1)
self.talon.setPosition(0)
and in OperatorControl
Code:
self.talon.set(270)
But when I enable the DS, the motor just keeps spinning, and the value goes past 270.