Coding Studio question

We use Vex Coding Studio with our V5 setup. This is our first year doing so and I know it is recommended that we not use VCS but this is not an option for us right now.
My students are trying to get their robots functional and one group can’t figure out why their right motor will not operate from the joystick. Instead, it will run from the “A” button on the same joystick. We have tried a different controller and the results are still the same. Any help you can give is greatly appreciated!

#include "robot-config.h"
int main() {
    //Display that the program has started to the screen.
    Brain.Screen.print("Tank Control Program Started");
    int clawSpeedPCT = 50;

    while(1) {

        Left.spin(vex::directionType::fwd, Controller1.Axis2.value(), vex::velocityUnits::pct);
        Right.spin(vex::directionType::fwd, Controller1.Axis3.value(), vex::velocityUnits::pct);
      //  Arm.spin(vex::directionType::fwd, Controller1.Axis3.value(), vex::velocityUnits::pct);
      //  Elbow.spin(vex::directionType::fwd, Controller1.Axis2.value(), vex::velocityUnits::pct);
          if  (Controller1.ButtonR1.pressing())
            Claw.spin(vex::directionType::fwd, clawSpeedPCT, vex::velocityUnits::pct);
        else if(Controller1.ButtonR2.pressing()) 
            //...Spin the claw motor backward.
            Claw.spin(vex::directionType::rev,  clawSpeedPCT, vex::velocityUnits::pct);
		vex::task::sleep(20); //Sleep the task for a short amount of time to prevent wasted resources.

V5 Brain comes with the default program that let you build and run basic robots without programming it with the custom user code.

You need to verify that you are starting your user program and not the default one.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.