REDUX Through Bore Encoder
The REDUX Through Bore Encoder is a versatile encoder designed with FTC teams in mind. Measuring both relative positioning (via a quadrature output), and absolute position (via a 12 bit analog output), this sensor allows you great flexibility in how and what you measure. Simply plug the port marked "Q" into an encoder port on the expansion hub, or the port marked "A" into an analog port, and you are up and running!
50.5mm x 40mm x 15.6mm
24mm x 32mm
12mm REX / 11mm HEX
2x JST-ph 4 pin
To convert the encoder's analog voltage to an angle in degrees, simply divide the analog voltage by the input voltage (in this case, 3.3v), then multiply that resulting number by 360.
//get our analog input from the hardwareMap
AnalogInput analogInput = hardwareMap.get(AnalogInput.class, "myanaloginput");
// get the voltage of our analog line
// divide by 3.3 (the max voltage) to get a value between 0 and 1
// multiply by 360 to convert it to 0 to 360 degrees
double position = analogInput.getVoltage() / 3.3 * 360;