Hello, we are trying to use a mag encoder as an absolute encoder via the spark max breakout board but we can’t get any real values. we connected the spark max via CAN.
How do we connect it to the breakout board?
How do you read the absolute position?
Assuming it’s the mag encoder from vex, it states the absolute encoder interface is PWM. I don’t think either the talonSRX or spark max have the ability to read a pwm value on its data port, meaning you’ll need the pwm value from the encoder to go back to the roborio.
Alternatively, if you use the absolute encoder as an incremental encoder, you can hook that up to the data port, and also install a limit switch to zero it at a certain location. Depending on the application, that can be good. If it’s for something with continuous rotation however (like a swerve module for instance) it’s not very good.
Edit: As noted below - I apparently provided bad information and the srx can read a pwm input from the mag encoder
it’s the SRX Mag encoder (yes from vex). we connected it to the talon via the data port and it works, but we are trying to connect it to the spark as well (we are trying the neo motors out) and we don’t know if in the next years we will have talons on our robot.