Reading encoder values on v5

Hi,
I’m new to the v5 stuff and I’m still trying to figure out some stuff that I could do on robotc. I’m currently figuring out pid, and was wondering how I would read an encoder value. thanks!

If you’re using VCS with C++, look at this: Motor.rotation(vex::rotationUnits::deg) .

how does that get the encoder value?

@CHINESEISASIAN The V5 motors have encoders built-in. The command he gave you asks the motor how far it has rotated, measured in degrees.

Noting that you’re coming from RobotC, maybe I should ask a different question. This may help us provide answers you’ll understand. Do you understand what it means that C++ is object oriented?