Using a Cancoder as Relative Encoder

Is it possible to use a CANcoder as a relative encoder? if so, what changes do we need to make in terms of wiring and code? We currently don’t have any other encoder available, and were wondering if we can use a CANcoder instead.

Yes CANcoders can be relative no wiring changes, just set it to boot to relative in Phoenix tuner or in your code.

You need to use encoder.getPosition() , if you are in relative mode it will return a relative result.
To set to relative mode you need

1 Like