Hi I was wondering if there is a way to initiliaze encoders explicitly in the code. Like specify the ports that they are in. I looked at the VEXcode API and looked at the encoder class and tried rightEncoder(triport::‘A’,‘B’) but it didnt seem to work
For VexCode, you’ll actually initialize your encoders using only one triport. So it will look more like
encoder rightEncoder = encoder(Brain.ThreeWirePort.A);
(You’ll plug the top wire of the encoder into A, and the bottom into B. This also only works for AB, CD, etc. but not BC or DE.)
3 Likes