if(Controller1.ButtonRight.pressing()) { Spinner1.spin(vex::directionType::rev); Spinner2.spin(vex::directionType::rev); }
That’s what I have right now, can you give me an example on how to add the semi-auto
what we want to do is to make the spinners operate for a certain amount of time or rotations with one button press. It would make picking the cubes so much simpler
Oh my, theres a lot going on here. Ok, to start everything off the author is looking for VEXCode Macros, and how to do multiple things with a button press. I am quite busy during this week but this should help direct future information. In addition, there is likely a resource if you use the search feature, so if you cannot find an answer you’re looking for you may be able to find the answer by searching for it.
The general approach is to define a function that performs the “macro” you want to perform, and then to register it as a callback for a particular button press with:
ControllerName.ButtonName.pressed(functionName);
You only need to do this once, at the beginning of your driver control function, and the function will run every time the button is pressed.