A Uniform Goal!
Use [Drive for], [Turn for], [Spin to position], [Spin for], and [wait] blocks to code the Hero Bot to score the four Green Blocks highlighted in orange into Goal II separately and win a 10-point Uniform Bonus.
- Select the VIQRC Virtual Skills - Full Volume Playground.
- Declare a variable to store the distance for the robot to drive to pick up a Green Block. Initial it to 0.
- Code the Hero Bot to score the four Green Blocks highlighted in orange into Goal II.
- Code the robot to spin the Arm Motor Group to lower the Arm to a desired position for intaking a Block.
- Drive the robot to the closest Green Block.
- Code the robot to spin the Intake Motor Group to pick up the Green Block.
- Code the robot to spin the Arm Motor Group to raise the Arm to a desired position for scoring.
- Drive the robot toward Goal II.
- Code the robot to spin the Intake Motor Group to drop the Green Block into the Goal.
- Update the variable value to represent the distance for the robot to drive to pick up the next Green Block.
- Use a loop to code the robot to repeat the above actions for a set number of times to score the four Green Blocks highlighted in orange into the Goal.
Helpful Hints
For help with declaring a variable and storing data in the project, please select the “TUTORIALS” button in VEXcode VR and choose the Storing Data Tutorial.
- For more information about the name rules for variables in VEXcode VR, please see this article.
Use the set block from the Variables category to set the value of the variable.
Matching Python command:
Use the repeat block from the Control category to code the VR Robot to repeat the blocks contained inside for a set number of times.
Matching Python command: