This example simulates a counting encoder using digital outputs and reads the value through the encoder interface.
For this example, connect the digital outputs to the digital inputs to provide a simulated encoder signal.