How to connect Redline Encoder to RoboRio


#1

We are intending to use the Redline Encoder on part or our robot. Do we use two PWM channels, 5V, and ground?

Thanks


#2

I think the encoder that you are referring to is quadratic (has 2 channels). It’s wiring is similar to this encoder


#3

Use the quadrature pinout from the board, then wire the A and B channels to two DIO ports and use the Encoder() class in wpilib.

Connect +5v and GND to the respective pins on the DIO.


#4

That worked great! Thanks. Power, ground, and two DIO channels. Call out the DIO channels in the constructor. From the AndyMark site:

Encoder MagEncoder;

	
	//  Define an encoder on Channels 0 and 1 without reversing direction and 4x 
            //   encoding type
	MagEncoder = new Encoder(0,1, false, Encoder.EncodingType.k4X);

‘0’ and ‘1’ refer to the DIO channels on the RoboRio.