Skip to main content
Teacher Portal

Play

Part 1 - Step by Step

  1. InstructInstruct students that they will be applying what they learned in Engage, to have their robot make a 360 degree turn using the [Spin for] blocks. The animation below shows how the robot should move as it makes a 360 degree turn. In the animation the degrees of rotation is counted up to 360 as the robot turns clockwise.
    Video file
    • Students know the distance the robot has to travel, now they need to calculate the number of wheel turns needed and input that number into the [Spin for] blocks. If the solution is correct, the robot will complete a 360 degree turn.
  2. ModelModel for students how to test their solutions with the Code Base.
    • Begin by showing students how to connect the Brain on their Code Base to their device in VEXcode GO. Because connection steps vary between devices, see the section on Connecting articles in the VEXcode GO STEM Library for specific steps to connect the VEX GO Brain to your computer or tablet. 
    • Once connected, they will open the Parade Float Example Project. To do so, select 'File' from the Toolbar, then 'Open Examples'. Next, have students select the 'Parade Float' Example Project. Example project icon reads Parade Float across the bottom and shows a blue robot icon above with an arrow indicating motion.
      • Watch the video below to see how to open the Parade Float Example Project in VEXcode GO. The File menu in the GO Toolbar is opened and from the dropdown the fourth item is clicked that reads ‘Open Examples’. The GO Example Projects menu opens and the Parade Float project is selected and loaded.

        Video file
    • Once the Example Project is open, students will need to change the direction of the right motor to reverse, by selecting the dropdown in the [Spin for] block.  Watch the video below to see how to change the parameter to make the robot turn in this project. The direction dropdown in the second [Spin for] block is opened by clicking on it and the direction is changed from ‘forward’ to ‘reverse’.

      Video file
    • Have students name their project as Parade Float Turn and save it to their device. See this section of articles for device-specific steps to save a VEXcode GO project
    • When they are ready, students will input their solution into the parameters of the [Spin for] blocks.

    VEXcode GO project with a When started block and two attached Spin for blocks, with the distance parameters blank. The project reads When started, Spin left motor forward for blank turns and don't wait; Spin right motor reverse for blank turns.
    Input Solutions into the Parameters to Test
    • Once students have input their solutions, select 'Start' in VEXcode GO to test the project.

    The Start button in the Toolbar of VEXcode GO, highlighted with a red box. The Start button is between a green Brain icon and the Step button.
    Select 'Start' to test project
    • Students will need to select the 'Stop' button in the VEXcode GO Toolbar to stop the project.
    • Allow time for students to test their projects and make updates, then test again, if necessary.
    • For students who finish early and need additional challenges, have them work on calculating the number of wheel turns needed to have the robot make a 180 degree turn. Have them test it out and see if their math was successful.
  3. FacilitateFacilitate a conversation with students as they work through how to code the robot to make the 360 turn with questions such as:
    • What are we trying to calculate?
    • What is the total distance the robot has to move to make a 360 turn? How did we determine this?
    • Knowing the total distance the robot has to move to make a 360 degree turn and knowing how far the robot moves with one wheel turn, how can we find out how many turns each wheel has to make the whole robot turn 360 degrees?
    • What information are you inputting into the [Spin for] blocks? Where did this number come from?

    Facilitate troubleshooting strategies as students test their projects. Students are using the Code Base to check their solutions, and in doing so, they will have to make sure that they have calculated the correct amount that the wheels need to turn. They will also need to check that they input that information into the [Spin for] blocks correctly. Ask questions and provide feedback as students work, but avoid giving students the answers as you facilitate the activity in this Lab.

    • Is the value in the [Spin for] block the same as your solution?
    • Is the decimal in the correct place?
    • Are the values the same in both [Spin for] blocks?

    If the Code Base doesn’t turn the correct distance and all inputs are accurate, this means that their solution (the number of wheel turns needed) is incorrect. Guide them to check their calculations or try a different method for finding this distance.

    There may be variations on the solution based on the units of measurement used, or due to variations when rounding measurements. The following is one example of a solution.

    VEXcode GO project with a When started block and two attached Spin for blocks. The blocks read when started, spin left motor forward for 2.64 turns and don't wait; spin right motor reverse for 2.64 turns.
    Possible Solution
  4. RemindRemind students that it may take multiple tries to get their project to work. Trial and error is a part of the testing process, and an important indicator of if their math was correct.
    • Did your robot go too far? Or not far enough? Why do you think that happened?
  5. AskAsk students how coding robots to move with precision can be useful in other areas.
    • What if you were coding your robot to drive through a maze. Why would it be important for the robot to turn accurately?

Mid-Play Break & Group Discussion

As soon as every group has had time to calculate the number of wheel turns needed to make a 360 degree turn and test their solutions, come together for a brief conversation.

This is the time to check for understanding and correct any misconceptions that students may have before moving on to Play Part 2. Give student groups an opportunity to share their solutions and their methods with questions such as:

  • Knowing that the robot had to turn 360 degrees, how did you determine the number of wheel turns needed?
    • Can you show and explain your calculation?

Part 2 - Step by Step

  1. InstructInstruct students that they will be applying what they learned in Play Part 1 to have their robot make a 180 degree turn, instead of a 360 degree turn, using the [Spin for] blocks in order to complete a parade route. They will also be using use their solutions from Lab 4 to have the robot drive forward the correct distance in the parade route. 

    VEXcode GO project with partially filled in parameters. The project begins with a when started block then has three sections of a comment paired with two Spin for blocks. The first section's comment reads Drive forward along the parade route; then spin left motor forward for 7.68 turns and don't wait; Spin right motor forward for 7.68 turns. The second section's comment reads Turn 180 degrees to face the start; then spin Left motor forward for blank turns and don't wait; spin right motor forward for blank turns. The third section's comment reads Drive forward to the starting location; then spin left motor forward for 7.68 turns and don't wait; spin right motor forward for 7.86 turns.

    The animation below shows how the robot should move as it completes the parade route: drive forward for 48 inches, (122 cm), turn for 180 degrees, then drive forward for 48 inches, (122 cm) to return to the start. This is using the code template above. In the animation the Code Base drives straight across five connected tiles, and when it reaches the end it turns 180 to the right and drives back to the start.

    Video file

     

  2. ModelModel for students how to get started with their projects in VEXcode GO.
    • Begin by having students open the Parade Route template.
      • Please note that [Comment] blocks are included to describe each section of the project. If you want to learn more about comments in VEXcode GO, see this article.
      • Also note that the first and last set of parameters have been populated with values based on solutions from Lab 4 to drive the robot 48 inches (122 cm), the length of the parade route.  These values may be slightly different from student solutions in Lab 4 due to slight variations in rounding measurements. 

    VEXcode GO project with partially filled in parameters. The project begins with a when started block then has three sections of a comment paired with two Spin for blocks. The first section's comment reads Drive forward along the parade route; then spin left motor forward for 7.68 turns and don't wait; Spin right motor forward for 7.68 turns. The second section's comment reads Turn 180 degrees to face the start; then spin Left motor forward for blank turns and don't wait; spin right motor forward for blank turns. The third section's comment reads Drive forward to the starting location; then spin left motor forward for 7.68 turns and don't wait; spin right motor forward for 7.86 turns.
    Parade Route Template
    • Students will need to calculate the number of wheel turns needed to make a 180 degree turn and input those values into the highlighted blocks.

    The same VEXcode GO project from before with the two Spin for blocks beneath the Comment to 'Turn 180 degrees to face the start' highlighted in a red box.
    Input wheel turns needed to make the 180 degree turn

    Model for students how to test their project on the Parade Route.

    • First, show them how to place their robot at the starting as shown in the image below.  Use the Blue Standoff on the wheel to help align the center of the wheel with the front edge of the starting line.

    Code Base Robot with Blue Standoff on the wheel lined up with the front edge of the black line bisecting a VEX GO Tile to show how to position the robot on the parade route.
    Use the Blue Standoff to help align the wheel axle and the front of the starting line
    • Once the Code Base is in place, select 'Start' in VEXcode GO to test the project.

    The Start button in the Toolbar of VEXcode GO, highlighted with a red box. The Start button is between a green Brain icon and the Step button.
    Select Start to test project
    • Students will need to select the 'Stop' button in the VEXcode GO Toolbar to stop the project.
    • Allow time for students to test their projects and make updates, and test again, if necessary.
    • Once students have had a chance to test their projects on the parade route, have them add their parade float attachments to the Code Base and participate in a whole-class parade where all groups take turns and run their projects.
    • For students who finish early and need additional challenges, have them code their robot to turn a different amount on the parade route.  Give students the following scenario: 
      • What if the turn on the parade route was 90 degrees? How would your calculations change? Test it out and see if your math was successful.
      • The parade was extended! At the end of your project, you need to make a 90 degree turn to the left to continue on the parade route. Add in two additional [Spin motor] blocks to the bottom of your project and make the calculations. 
  3. FacilitateFacilitate a conversation with students as they build and test their projects with questions such as:
    • What do you need to change in your calculation from Play Part 1 to have the robot turn 180 degrees instead of 360?
    • What is the relationship between these two turns? How does that effect your calculations?

    Facilitate troubleshooting strategies as students test their projects. Students are using the Code Base to check their calculations, and they will have to make sure that they have calculated the correct number of turns needed to both drive to the end of the parade route and make the 180 degree turn, then input that information into the [Spin for] block correctly. Ask questions and provide feedback as students work, but avoid giving students the answers as you facilitate the activity in this Lab. 

    There may be variations on the solution based on the units of measurement used, or due to slight variations when rounding measurements. The following is one example of a solution. 

    The same VEXcode GO project as before with all parameters filled in. The first section's comment reads Drive forward along the parade route; then spin left motor forward for 7.68 turns and don't wait; Spin right motor forward for 7.68 turns. The second section's comment reads Turn 180 degrees to face the start; then spin Left motor forward for 1.32 turns and don't wait; spin right motor reverse for 1.32 turns. The third section's comment reads Drive forward to the starting location; then spin left motor forward for 7.68 turns and don't wait; spin right motor forward for 7.86 turns.
    Possible Lab 5 Solution
  4. RemindRemind students that it may take multiple tries to get their Code Base to make the turn as intended. Multiple tries is part of the testing process and an important indicator of if their math was correct. As they go through and work on their math and VEXcode GO projects, ask them the following questions.
    • How far did your Code Base turn when you ran your project? Was that too many turns, too few turns, or just enough? 
    • If your Code Base turned too much or too little, what can you check in your calculations?
    • What can you check in your VEXcode GO project? 
  5. AskAsk students to think about different variables like wheel sizes or turning distance could affect their calculations?
    • If you had a robot with wheels that were larger, how would that impact the total number of turns? Why do you say that?
    • If you had a robot with wheels that were smaller, how would that impact the total number of turns? Why do you say that?