I’m trying to use the Thrifty absolute encoder for reading swerve module rotation on an SDS Mk4i. But, instead of reading the correct value from the encoder, the SPARK reads either a random value or 0.
I have the encoder connected to the SPARK MAX through an adapter board (PWM signal connected to pin 6). I’ve also checked the encoder’s PWM signal with a multimeter and it changes correctly as the wheel rotates.
think you might be confusing PWM and analog signals here. Pin 6 on a spark max takes a PWM signal in (eg varies from x-y% duty cylce based on the position of the encoder), while the thrifty bot encoders output an analog signal (eg varies from x-y volts based on the position of the encoder)
edit:
definitely make sure you set the jumper to 3.3v as mentioned below
The thrifty bot encoder works with an analog signal, and not PWMPulse Width Modulation.
You’llLimelight, an integrated vision coprocessor need to power the encoder at 3.3V (there is a jumper to do this). There is a 3.3V pin on the Spark Max. Then use Pin 3, and ground.