Arrow buttons

I have a v5 controller and I am trying to program the arrow buttons to do things, but I do not know what they would be called. For example, in programming the L2 button I would write ButtonL2. What would the different arrows be in programming?

ButtonUp
ButtonDown
ButtonLeft
ButtonRight

2 Likes
To add to what @Deicer said

Who keeps giving correct answers even before I could type one line :slightly_smiling_face:

This is vex::controller API that has a list of all available buttons:
https://www.robotmesh.com/docs/vexv5-cpp/html/classvex_1_1controller.html

And this is an example of how you can use those buttons in your V5 program:
https://help.vex.com/article/112-vcs-example-program-with-controller-c-claw-and-arm

#include "robot-config.h" 

int main()
{
    //Use these variables to set the speed of the arm and claw.
    int armSpeedPCT = 50;
    int clawSpeedPCT = 50;

    while(true)
    {
        if(Controller1.ButtonUp.pressing()) {
            ArmMotor.spin(directionType::fwd, armSpeedPCT, velocityUnits::pct);
        }
        else if(Controller1.ButtonDown.pressing()) {
            ArmMotor.spin(directionType::rev, armSpeedPCT, velocityUnits::pct);
        }
        else {
            ArmMotor.stop(brakeType::brake);
        }
        // and so on  ...
    }
}
2 Likes