Relative encoders with Neo Motors and Spark max

Hi, for this season we’re using Neo Motors in the chassis, and we want to use the built in relative encoders of the motors, but we are struggling with use of this ones because is our first time using relative encoders. We want to use them in the autonomous mode. Does anyone know how we can do this?

do you mean using the relative encoders for swerve? in that case you will have to align the wheels manually but it can be done by just replacing your calls to a cancoder or other absolute encoder with calls to the integrated relative encoder.

to auto align, you have to put all your wheels pointed in the same direction you wish to be 0 degrees when the robot code is started

For autonomous, you might be thinking of using these for odometry. Most autonomous driving is going to be built on odometry. There’s a fair amount of software required to make this work, but it starts by being able to convert encoder readings to distances driven. Your best bet is probably going to be finding a good example, which matches your programming language, type of drive base, and SPARK MAX/NEO.

If you would like us to pair you with one of our team’s assistant programmers that would guide you in a more step by step fashion, Hit me up!