Skip to main content
Teacher Portal

Play

Part 1 - Step by Step

  1. InstructInstruct each group that they will be opening and starting the 'Drivetrain Moves and Turns' example project in VEXcode GO and observing the behaviors of the Code Base.

    The Code Base is shown to the right of the Drivetrain Moves and Turns VEXcode GO Example Project. The Example Project begins with a When started block and shows a sequence of Drivetrain blocks and comments to drive the robot in four 150mm increments, alternately turning right and left.

     

  2. ModelModel for students the steps to launch VEXcode GO.

    Note: When you first connect your Code Base to your device, the Gyro built into the Brain may calibrate, causing the Code Base to move on its own for a moment. This is an expected behavior, do not touch the Code Base while it's calibrating.

    • Students will be using an example project to help them learn about Drivetrain commands in VEXcode GO. Model for students how to open the File menu and select 'Open Examples.'

      File Menu open in the Toolbar of VEXcode GO, with Open Examples highlighted in a red box. Open examples is the third menu option after New Blocks Project and Open.

       

    • Open the 'Drivetrain Moves and Turns' example project.

      Drivetrain Moves and Turns Example Project features a stack of code on the left and a Note on the right. The note reads Project: Drivetrain Moves and Turns; Description: This example project uses the Drivetrain to drive and turn the Code Base robot in different directions. Open the Monitor Console to see the Drivetrain's velocity, heading, and rotation while it moves. Configuration: Code Base. The blocks in the project are interspersed with Comments describing the robot's behavior. The Drivetrain blocks read as follows: When started, set drive heading to 0 degrees; set drive velocity to 20%; then drive forward for 150mm; turn right for 90 degrees; drive forward for 150mm; turn left for 90 degrees; drive forward for 150mm; turn left for 90 degrees;  and drive forward for 150mm; turn right for 90 degrees.
      Drivetrain Moves and Turns

       

    • Model for students how to name and save the example project. Have students name their project Drive.
    • Then, have students start the project and observe the movement of the Code Base.
    • After the project is complete, students should be sure to select 'Stop' in the Toolbar.

      The VEXcode GO Toolbar with the Stop button highlighted in a red box. The icons from left to right show a green Brain icon, then Start, Step, Stop, Share, and Feedback.
      Stop the Project

       

    • Model for students how they can change the parameter of one of the blocks by selecting a dropdown or changing the number in the [Drive for] and [Turn for] blocks. Students should make 1-2 changes, then start their project to see what changed.

      The Drivetrain Moves and Turns example project with the parameter of the first Drive for block open and the 'reverse' option is highlighted with a red box.
      Change Parameters

       

    • Students should continue testing different parameters and see how the Code Base moves as a result.
    • Help can be used to provide details on how to use the block and how to change the block’s parameters.
  3. FacilitateFacilitate a discussion with students as they test the example project.
    • What parameters have you changed? How did they affect the movement of the Code Base?
    • What do you think would happen if the first [Drive for] block was set to drive 200 millimeters? How would that compare to the original parameter?
  4. RemindRemind groups that if they are confused on what a block does, they can use the Help feature.

    The Help window in VEXcode GO is shown for the Drive for block. The block is defined as 'Moves the Drivetrain for a given distance', and information about How to Use the block is shown.
    Help Window
  5. AskAsk students what other things they know that use code. Have them list everyday items/devices that they use that they think use code.

Mid-Play Break & Group Discussion

As soon as every group has finished testing the example project, come together for a brief conversation.

  • What parameters did your group change while testing the example project?
  • How did your Code Base move after you changed that parameter in the "Drivetrain Moves and Turns" example project?
  • If you had a chance to change one additional block in the project, what would you change? How do you think it would change how the Code Base moves?

Part 2 - Step by Step

  1. InstructInstruct each group that they will be creating their own VEXcode GO project to drive the Code Base past the second gate of the slalom course. View the animation below to see how the Code Base could move to start the course. In this animation, the Code Base begins in the lower left corner of the four tile course. It drives forward past the first gate. It then turns 90 degrees to the left and drives forward to pass the second gate. Finally, the Code Base turns 90 degrees to the right and drives toward the third gate then stops.
    Video file
  2. ModelModel for students the steps to launch VEXcode GO.
    • Model the steps to connect a Brain to your device.
    • Students should use the 'Drivetrain Moves and Turns' example project as a starting point for their slalom project. Model for students how to open the example project by selecting the File Menu and then 'Open Examples.'
    • Once the example project is open, students should save the project and name it Slalom Course.

      The project name box in the center of the VEXcode GO Toolbar is highlighted with a red box, and reads Slalom Course.
      Name the Project

       

    • Model for students how to add and remove blocks from the project. They add blocks by dragging each block into the Workspace and can remove them by dragging the blocks from the Workspace back into the Toolbox. View the video below to see how blocks at the end of the stack are selected and dragged back towards the Toolbox, and deleted, to remove them from the project.

      Video file
      Remove Blocks
    • Students should add and remove blocks as needed to build their project that drives the Code Base past the second gate of the slalom course. Once they think they have a project that will work, model for students how to test by placing the Code Base at the starting point and start their project.

      A top down view of the slalom course from the previous lab, with the third black line holding the second gate on the right side highlighted in a red box. The Code Base sits at the start of the course on the far left.
      Second Gate of the Slalom Course

       

    • Remind students to stop their project after each test.

    The VEXcode GO Toolbar with the Stop button highlighted in a red box. The icons from left to right show a green Brain icon, then Start, Step, Stop, Share, and Feedback.
    Stop the Project
    • NOTE: Students can map out their plan for navigating the Code Base through the slalom course by editing the comments in the project. 
  3. FacilitateFacilitate a discussion with students as they create their projects and test their code.
    • How far does the Code Base need to drive forward at the beginning?
    • Describe how the Code Base is going to move to get it past the second gate.
    • What parameters are you changing in your project? Why?
    • So far, how does this compare to remote control driving your Code Base through the course?
  4. RemindRemind groups that this may take multiple tries to get their project to work. Each time the project fails, they learn a bit more about coding and what it will take to succeed at the challenge!
  5. AskAsk students to think about a time when they have had to try something multiple times before they got it right. Share with students a time when you have tried something multiple times before you got it right. Adults in all professions in the real world constantly have to rework ideas and projects daily to make things better.