Skip to main content

The V5 Clawbot is ready to grasp!

This exploration will let you start creating some cool projects that use the V5 Clawbot's claw to grasp objects.

  • VEXcode V5 that will be used in this exploration include:

  • To find out more information about the block, open the Help and then select the [Spin for] block.

  • Make sure you have the hardware required, your engineering notebook, and VEXcode V5 downloaded and ready.

Materials Required:
Quantity Materials Needed

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


VEXcode V5


Engineering Notebook


Clawbot (Drivetrain 2-motor, No Gyro) template example project


Aluminum can

Step 1: Preparing for the Exploration

Before you begin the activity, do you have each of these items ready? Check each of the following:

  • Are the motors plugged into the correct ports?

  • Are the smart cables fully inserted into all of the motors?

  • Is the Brain turned on?

  • Is the battery charged?

Step 2: Start a New Project

Before you begin your project, select the correct template project. The Clawbot (Drivetrain 2-motor, No Gyro) template example project contains the Clawbot's motor configuration. If the template is not used, your robot will not run the project correctly.

Complete the following steps:

  • Open the File menu.

  • Select Open Examples.

  • Select and open the Clawbot (Drivetrain 2-motor, No Gyro) template example project.

  • Since we will be programming to control the claw, rename your project ClawControl.

  • Save your project.

  • Check to make sure the project name ClawControl is now in the window in the center of the toolbar.

Step 3:  Program the V5 Claw to Open

We are now going to begin by programming the claw to open!

  • Add the set motor timeout and [Spin for] blocks to the {When started} block and set their parameters as shown above.

  • Notice that the set motor timeout block appears first in the stack. It sets how long the Claw Motor can run and stops it after that time.

    • The set motor timeout block in this project is set to 2 seconds. So even if the motor does not move a full 60 degrees, the project stops the Claw Motor after 2 seconds have passed.


  • Watch the Opening the Claw Tutorial in VEXcode V5  if you would like a demonstration.

  • Click on the Slot icon. You can download your project to one of the available slots in the Robot Brain. Click on Slot 1.

  • Connect the robot to your computer or tablet. The Brain icon in the toolbar turns green after a successful connection has been made.

  • Click the Download button on the toolbar to download the Drive project to the Robot Brain.

  • Check that the ClawControl project has downloaded to the brain in the slot you chose.

  • Run the project on the Clawbot by making sure the project is selected and then press the Run button. Congratulations on creating your first project for moving the Claw!

Step 4: Try This: Close the V5 Claw

Now that you have programmed the claw to open, you will now program it to close.

Now that you can open the claw, you will want to close it as well.

  • Return to your ClawControl project and add a [Spin for] block to have the Claw Motor spin closed for 30 degrees. The claw should close half of the way because it spun open for 60 degrees.

  • Test that your revised project has the claw open for 60 degrees and then close for 30 degrees by downloading and running your ClawControl project.

Step 5:  Try This: Sequencing Multiple Movements

Not everything that you pick up with the claw will be the same size. Try opening the claw to different positions along the range of motion.

  • Spin the motor in order to:

    • Open for 70 degrees

    • Close for 20 degrees

    • Open for 10 degrees

    • Close for 30 degrees

    • Close for 25 degrees

  • Remember to use the [Set motor timeout] block to set a timeout of 2 seconds.

  • If the Claw Motor starts at 0 degrees, how many degrees is the Claw Motor open at the end of the project?

Step 6: Completing the Lock Tight Challenge


Program the Clawbot to securely close the claw on an empty 12-ounce aluminum can without crushing the sides.

  • Have the Clawbot hold onto the can while it raises and lowers its arm for 45 degrees.

  • The Clawbot should then release the can and back away from it.

  • Start the challenge with an opened claw and an empty can within it.