Robot configuration

Is this correct? I don’t have my Cortex with me so I can’t check it.

vex::motor Backleftmotor (vex::PORT1, vex::gearSetting::ratio18_1,true);
vex::motor Backrightmotor(vex::PORT2, vex::gearSetting::ratio18_1,true);

I am not done with this .

It’s a brain, not a cortex in V5. If you’re in RobotC, as suggested by the use of “cortex,” no, it’s not correct. It would be a #pragma command. I’m also not sure what studio you’re in if it’s V5, which seems likely because of the syntax used. Some studios do this automatically.

Furthermore, you could just look for example codes and see if your form matches.

Edit: I’m dumb. This is posted in the VCS category. VCS should do this part for you after you configure your robot in the screen where you drag your motors onto the screen.

I am in c ++ for vex

Sorry I meant brain still remembering last year.

I think C++ still has the screen where you drag stuff. I’m booting it up now to check.

I’m looking through basic motion control example codes, and can’t find where VCS needs to know anything about your motors besides on the robot configuration window. (Except for braketype commands) Are you in C++ Pro?

Also, I guess it doesn’t set up your motors for you in text like I thought it did.
EDIT: Either I have no idea what I’m talking about or that isn’t a command you need.

I am in the one above C++ on the screen where you choose which one.

The one above C++ pro

THis is all of my code. #include “robot-config.h”
vex::motor Backleftmotor (vex::PORT1, vex::gearSetting::ratio18_1,true);
vex::motor Backrightmotor(vex::PORT2, vex::gearSetting::ratio18_1,true);
vex::motor Arm1(vex::PORT3,vex::gearSetting::ratio18_1,true);
vex::motor Arm2(vex::PORT4,vex::gearSetting::ratio18_1,true);
vex::motor Claw1(vex::PORT5,vex::gearSetting::ratio18_1,true);
vex::motor CLaw2(vex::PORT6,vex::gearSetting::ratio18_1,true);
int main()
{
while(true)
{

Backleftmotor.spin(vex::directionType::fwd, Controller1.Axis3.value()/2, vex::velocityUnits::pct); //Tank Control : Motor runs at half speed
Backrightmotor.spin(vex::directionType::fwd, Controller1.Axis2.value()/2, vex::velocityUnits::pct); //Tank Control : Motor runs at half speed
}

if(Controller1.ButtonX.pressing())
{
    Arm1.spin(vex::directionType::fwd, 100, vex::velocityUnits::pct);

}                                                                                //This is the code for arm1
    
else if(Controller1.ButtonB.pressing())
{
    Arm1.spin(vex::directionType::rev,100,vex::velocityUnits::pct);
}
                                                                                              //This is the code for Arm2

if(Controller1.ButtonX.pressing())
{
    Arm2.spin(vex::directionType::fwd,100,vex::velocityUnits::pct);
}

else if (Controller1.ButtonB.pressing())
{
    Arm2.spin(vex::directionType::rev,100,vex::velocityUnits::pct);
}

if(Controller1.ButtonR1.pressing())
{
Claw1.spin(vex::directionType::fwd,100,vex::velocityUnits::pct);
} //This is the code for Claw 1
else if(Controller1.ButtonR2.pressing())
{
Claw1.spin(vex::directionType::rev,100,vex::velocityUnits::pct);
}

if(Controller1.ButtonR1.pressing())
{
    Claw2.spin(vex::directionType::fwd,100,vex::velocityUnits::pct);
}
                                                                                       //This is the code for Claw2
else if(Controller1.ButtonR2.pressing())
{
    Claw2.spin(vex::directionType::rev,100,vex::velocityUnits::pct);
}

}

I’ll just download it and test it. I have a brain with me.

It likes your BackLeftMotor, but not your Arm1. Those are the only ones I tested. It says it’s being redefined, but I can’t find where else it thinks there’s a definition. It may be that I configured the robot wrong in that screen. Otherwise, I don’t know what the problem is. You may want to wait for someone a little more experienced in the new studio. Also, DRow will get mad at us if we continue a lengthy discussion between only two people.
EDIT: You should probably just wait and test it on yours, or attach a .vex file I (or whoever gets here first) can just run instead of trying to figure out what I need to add and comment out.