We need help with the controller buttons

We are just starting with the V5 system and vex code V5 text and our Instructor said that we had to put a program on one button on the controller and we need help programming it.

All help is welcomed and thank you.

ArmMotor.spin(forward);
ArmMotor.setVelocity(10,percent);
{
if(Controller1.ButtonA.pressed()){ //On this one is where we keep getting the mesage

if(LimitSwitchA.pressing()){
ArmMotor.setStopping(brake);
wait(10,seconds);
ArmMotor.spinToPosition(-15,degrees);
ArmMotor.setVelocity(10,percent);
}
}
}
}

Welcome to the forum!

A good place to start is using the example programs and edit those. They are pretty detailed with comment and can be used for basic programming.

1 Like

We have tried that and we keep getting a error message

Often if you’re getting an error message, it tells you what is wrong. If you don’t understand the error message, you would have to post it where other people can see it so they can help you interpret it. We can’t help you interpret an error message we’ve never seen, especially when we haven’t seen all of your code, either.

1 Like

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