Skip to main content
Materials Required:
Quantity Materials Needed
1

VEX V5 Classroom Starter Kit (with up-to-date firmware)

1

VEXcode V5 (latest version, Windows, macOS, Chromebook)

1

Engineering Notebook

1

Using Loops (Tutorial)

1

Tank Drive example project

2 or more

Classroom items to be used as obstacles
 

This activity will give you the tools to program your Controller.

You can use the Help information inside of VEXcode V5 to learn about the blocks. For guidance in using the Help feature, see the Using Help tutorial.

Toolbar in VEXcode V5 with a red arrow pointing to the Tutorials icon. The toolbar shows, from left to right, the V5 logo, a globe icon, File, then Tutorials.

Step 1: Let's start programming the Controller.

  • Start by watching the Using Loops tutorial video.
  • Open the Tank Drive example project.

    VEXcode V5 project with a Note to the right of it in the workspace. The note is titled Using a Clawbot, and has two bullet points: The left up/down Controller Axis, 3, will drive the robot forwards and backwards; and The right left/right Controller axis, 2, will control turning the robot to the left or right. The project to the left begins with a When started block and has a forever loop attached. Within the forever block are four blocks that read: set left motor velocity to Controller 1, 3 position percent; set right motor velocity to Controller 1, 2 position, percent; then spin left motor forward; and spin right motor forward.

    Do the following in your engineering notebook:

    Predict what the project will have the Clawbot do. Explain more than the fact that the project utilizes the Controller.
    How do the joysticks move the robot? What is the Clawbot doing?

  • Save, download, and run the Tank Drive example project.

    Project Name dialog box in the VEXcode V5 Toolbar reads Tank Drive. To the left of the name Slot 1 is selected, to the right, the Toolbar reads Saved.

  • For help, see the tutorial in VEXcode V5  that explains how to Download and Run a Project.

    Toolbar in VEXcode V5 with a red arrow pointing to the Tutorials icon. The toolbar shows, from left to right, the V5 logo, a globe icon, File, then Tutorials.

  • Check your explanations of the project in your engineering notebook and add notes to correct them as needed.

Step 2: Controller: Tank Drive

What are the benefits of using the [forever] block?

Here is our project without the [forever] block:

A VEXcode V5 block project with four blocks attached to the When started block. In order from top to bottom the blocks read: Set Left Motor velocity to Controller 1, 3 position, percent; then Set Right motor velocity to Controller 1, 2 position, percent; followed by Spin Left Motor forward and Spin right motor forward.

What do you think would happen if this program were run? Discuss as a group. Write down your prediction in the engineering notebook.

Step 3: Navigate a Slalom Course!

A snowboarder is racing downhill on a snow-covered slope, navigating through a series of red and blue gates positioned in a zigzag pattern

Slaloms are courses which the participant must navigate around the set flags, or markers. Ski slaloms are a popular winter sport and are included in the Winter Olympics.

Now that the Controller is paired and the project is downloaded, you are ready to move your Clawbot using the Controller!

  • Collect the four classroom items you will use as flags in your slalom from the teacher.
  • Collaborate to set the flags in place for the Driver to navigate the Clawbot around, according to the slalom diagram.
  • Download Tank Drive Example project. If there are any questions about how to download a project, check out the Download and Run a Project tutorial.

Step 4: Robo-Slalom

An illustration of a slalom course on snow, with a 'Start' label at the top, and a Finish line at the bottom. Between, a dotted zigzag path weaves between alternating blue and red flags.

Use the Controller to move your Clawbot along the outside of each “flag.” The robot’s path must prevent it from touching any flag, and allow it to cross the finish line.

  • Run the project and drive the Clawbot forward and reverse, and turn left and right using both Joysticks.
  • Time how long it takes for the Clawbot to complete the course. Document the times in the engineering notebook.
  • How fast can you get Clawbot through the Slalom course?