I need help initlazing this encoder. or a link to the docs.
Are you connecting this directly to the RIO or to a SparMAX and do you want it to be relative or absolute?
Relative for RIO connection
Absolute for RIO connection
For connection directly to a SparkMAX, create a RelativeEncoder or AbsoluteEncoder and call getAlternateEncoder() or getAbsoluteEncoder on the motor controller.
If connected via the data port on a CAN Spark motor controller, use spark.getAbsoluteEncoder(SparkAbsoluteEncoder.Type.kDutyCycle)
:
https://codedocs.revrobotics.com/java/com/revrobotics/cansparkbase#getAbsoluteEncoder(com.revrobotics.SparkAbsoluteEncoder.Type)
If connected to the RoboRio’s PWM pins, use the built in DutyCycleEncoder class:
thanks
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.