PROS coding help (New to PROS)

Sorry, I’m new to PROS, how can I move a motor with the press of a button on the controller?

Please read the documentation https://pros.cs.purdue.edu/v5/.

2 Likes

I don’t see it anywhere

https://pros.cs.purdue.edu/v5/tutorials/index.html#general-tutorials
Take a look at some of these tutorials. If you want to move a motor with a button, then I recommend looking at the Programming the Clawbot tutorial on the page that I linked. If you want to use some of the more advanced features of PROS, you should be able to independently browse the documentation and look for what you need.

4 Likes

First if you don’t know C++ start there. Do a crash course at the least. For your button you would write an if statement for each button you wanted to map to a motor.

while (true) {
if (master.get_digital(DIGITAL_A)) {
motor.move(100);
}
}

and you have to put it in a while true loop in the opcontrol function or else it will only check for the button once and the stop.

1 Like