Simple as that. What function do I put it under, what should I write, please help, videos aren’t helping.
I just want to get it to move forward and backwards.
Simple as that. What function do I put it under, what should I write, please help, videos aren’t helping.
I just want to get it to move forward and backwards.
You need to write your code in the opcontrol()
function.
Look at the Programming the Clawbot section in the PROS API. It goes through the basics of coding a clawbot, including the drivetrain, and is a great start to learning PROS.
Also, pros::Motors
has a move() method that takes in a value from -127 to 127.
Just take in the value of your controller axis and put it as a parameter for the move()
method.