Shaft Encoder Programming in V5

First of all you need to plug them certain way:

Then you define encoder variable over a triwire port and could get its rotation() or velocity values():

vex::encoder enc1 = vex::encoder(Brain.ThreeWirePort.A);

double r = enc1.rotation(rotationUnits::deg);

https://api.vexcode.cloud/v5/html/classvex_1_1encoder.html