SharpAI
/

how do I use the REV through bore encoder

Wiring and Connection

To use the REV Through Bore Encoder, plug it into the encoder ports located near the motor ports on the expansion hub . Because the encoder has a high number of Counts per Revolution (CPR), it can lose steps if plugged into ports 1 or 2 .

Operating Mode

In the FIRST Tech Challenge control system, the REV Through Bore Encoder is used as a relative, incremental encoder using the quadrature communication protocol . Although the encoder supports absolute positioning, this capability is only available over PWM, which is inaccessible within the FTC control system .

Programming and Reading Data

  • Reading Position: Call the getCurrentPosition() method on the DcMotor object associated with the port where the encoder is plugged in .
  • Resetting Position: Use STOP_AND_RESET_ENCODERS to reset the encoder position to zero at the beginning of an OpMode . Otherwise, the position remains relative to the initial position of the shaft when the robot was powered on .
  • Velocity Warning: Avoid calling getVelocity() on a DcMotorEx object with this encoder, as its high CPR can cause the returned 16-bit signed integer to overflow .

Additional Resources

For more specific details on different versions and control systems, refer to these restricted documents:

Was this right?

Generated from indexed documentation and can be wrong — check the source beside each claim. Follow-ups are not saved. Unofficial, not affiliated with FIRST. Quotes Game Manual 0 (CC BY-NC 4.0) and FTC Docs (BSD 3-Clause). Built by Sharp Face Robotics.