Using Through Bore Encoder as an absolute encoder with a Neo

I’m trying to use an absolute encoder with my arm assembly. How do I configure the Spark Max to use both the Neo encoder and the through bore encoder. I tried to hook the encoder up to the Spark using the absolute encoder adapter, but there is not much documentation on how to go from there, and the telemetry tab isn’t showing anything. Thanks in advance!

You shouldn’t have to configure anything on the SparkMax for the two encoders unless you are trying to use the built-in offset calibration feature. You should be able to just declare either/both in code and go.

private CANSparkMax m_motor;
private RelativeEncoder m_integratedEncoder;
private SparkMaxAbsoluteEncoder m_throughBoreEncoder;

m_motor = new CANSparkMax(Constants.motorID, MotorType.kBrushless);
m_integratedEncoder = m_motor.getEncoder();
m_throughBoreEncoder = m_motor.getAbsoluteEncoder(SparkMaxAbsoluteEncoder.Type.kDutyCycle);
1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.