How do I code a program on Vexcode Pro V5 that causes a motor to start turning when I press a button and to stop spinning when I press it again.
I have a basic Idea of how to do it, but I do not know how to write it.
If Button a is pressed and value is 0
set value to 1
If button a is pressed and value is 1, set value to 0’
If value of Button a == 1
make the motor spin
If value of Button a==0
I want to use the code for an intake that starts and stops so that my team would not have to hold the button while going around the field