Spark max encoder

Hi guys my team is using Spark max, but we are having troubles to plugged in the encoder to the RoboRio, so how could I do that?

If you are referring to the encoder which is part of the NEO motors, that sensor cable MUST be plugged into the Spark MAX.

However if it is an external encoder, you can either plug it into the RoboRIO, or if it is low RPM, plug it into the Spark MAX and configure an alternate encoder (this will sacrifice the limit switch pins however).

Is it an external encoder you are trying to setup, or the one built into the NEO?

(Assuming that you are using the Spark MAX in brushless mode with NEO motors)

Yes I’m talking about the NEO, and it is not an external encoder is the one that is already on the neo

As far as I am aware, the sensor cable on the NEO must be plugged into the sensor connector on the front of the Spark MAX (ie above the 3 motor wires, and is the only place that cable will plug in).

Once you’ve done this and constructed a CANSparkMax object, you can access the NEO’s internal encoder with getEncoder().getVelocity() or getEncoder().getPosition()

What is the problem you are having?


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