Motor Encoder

Hello, I am using VEX V5 Text and I was wondering how I would display encoder and other types of sensor values on the brain screen. I was also wondering how to limit your arm from going any further up using these encoders when they hit a certain value. I am fairly new to this coding language so please help

Brain.Screen.clearLine(1,color::black);
    Brain.Screen.clearLine(2,color::black);
    Brain.Screen.setCursor(1,0);
    Brain.Screen.print("Arm rotation: %f degrees",motor_arm.rotation(rotationUnits::deg)/7.0);
    Brain.Screen.setCursor(2,0);
    Brain.Screen.print("Claw rotation: %f degrees",motor_claw.rotation(rotationUnits::deg)/3.0);
2 Likes