How to use encoders in VEX Code (Beginner)

I am not able to find the command to he utilize the built in encoders for the V5 motors. I recently became the team’s programmer and I’m in dire need of help. I am trying to make the angler move forward using these encoders. Can someone tell me the command in VEX Code tat would work for this? Thanks!!!

make sure to tag your topics correctly. This is not iq. The rotateTo/For commands use the integrated motor encoders. Just remember that rotateTo/For are blocking and startRotateTo/For are not blocking.


Can you write a example line, for say 1080 degrees? And I apologize about my noobish category placement.

This is pseudo code so you wont be able to just copy paste but this is the format.

Motor.rotateTo(/*insert target here*/, rotationUnits::deg/*deg/rev/raw*/, /*insert speed here*/ , velocityUnits::rpm/*rpm/pct/dps*/);

hope this helps.
you can also add an optinal “false” parameter after your velocity type to make it non blocking.



1 Like

What does DPS measure?

Degrees per second. I dont use this one because rpm is essential the same thing.

1 Like

Ohh, why is that an option?

360 Degrees == 1 reveloution
60 secconds == 1 minute
6DPS == 1RPM == 0.016666666666666666 HERTZ

What is the point of having them both.

Vexcode should only let you give motor speeds in hertz :stuck_out_tongue:.