Skip to main content

Let's program a sequence!

In this activity, you will outline a plan for the sequence of movements that your robot will need to make in order to grab, lift, and move an object.

You will first review two tutorial videos about programming the claw and arm. Then you will identify the correct sequence of steps to approach, grab, and lift an object, and plan that project using pseudocode.
You will then create, download, and run the project using the pseudocode that helped you plan!

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

Materials Required:
Quantity Materials Needed

VEX IQ Super Kit


VEXcode IQ


Engineering Notebook


Meter stick or ruler


Clawbot (Drivetrain 2-motor) template example project


Aluminum can or empty water bottle

Step 1: Preparing for the Exploration

Before you begin the activity, do you have each of these items ready? The Builder should check each of the following:

Step 2: Start Planning a Path

Before you begin planning the path that your robot will take, first review the Moving the Arm and Open the Claw tutorial videos in VEXcode IQ.image of the Tutorials icon in the Toolbar in VEXcode IQ

  • Moving the Arm Tutorial Videoimage of the moving the arm tutorial video icon in VEXcode IQ
  • Open the Claw Tutorial Videoimage of the open the claw tutorial video icon in VEXcode IQ

Now, in your engineering notebook, use pseudocode (Google Doc / .docx / .pdf )  to write the correct sequence of steps to approach, grab, and lift an object like an empty water bottle or aluminum can.image of the Clawbot approaching a water bottle

  • Parts of this problem to keep in mind:

    • First, you will need to measure in millimeters how far away the object is from the robot. You will need this to determine how far forward and in reverse the robot should move.

    • Identify how many degrees the claw will have to open and close depending on its range of motion and how large the object is. For more help, refer to the previous page in the Play section.

      • Hint: Open the Device Menu and see how many degrees the claw will close with the object inside.

    • Identify how far up in degrees the arm will raise to carry the object.

    • When you approach an object, the claw should already be opened. If you approach an object with the claw closed, the closed claw could knock the object over.

    • The robot will also have to grasp the object in its claw, raise the object up, move in reverse to relocate the object, and then place the object back down and release it.

Step 3: Programming a Sequence

  • Open the Clawbot (Drivetrain 2-motor) template example project.Image of the Clawbot (Drivetrain 2-motor) template icon in example projects in VEXcode IQ

  • For help opening an example project, view the Use Example Projects and Templates tutorial video in VEXcode IQ Blocks.Image of the Use Example Projects and Templates tutorial video icon in VEXcode IQ

  • Rename and save the project as 'Sequence'.image of the renamed project in the toolbar of VEXcode IQ

  • For help renaming and saving a project, view the Naming and Saving Your Project tutorial in VEXcode IQ.

  • Now, create your project using your pseudocode. First outline your project using comments to insert your pseudocode. The example shown below is a reference. Degree and distance measurements may be different depending on how far away your object is and its size.Image of the project's pseudocode in comment blocks in VEXcode IQ

  • Use the [Drive], [Spin for], and [Spin to position] blocks to create the project based on the pseudocode.

    Don't forget to reset the Arm Motor's position to 0 and to include a 3-second timeout for the Claw Motor.

    Use the image below as an example of how to organize the project. The following project is not complete but you should completely program yours.Image of the project with some of the behaviors added

  • After your project is complete, predict what it will do. Write your predictions in your engineering notebook.

Step 4: Test the Project!

Now that you have created a project to approach, grab, and lift and object - let's test it!

  • Download and Run your Sequence project. For help, view the Download and Run a Project tutorial video in VEXcode IQ. It will have the following icon: Image of the Download and run a project tutorial video icon in VEXcode IQ

Did your project run as intended? Write your observations in your engineering notebook comparing your pseudocode to your final project and answer the following questions:

  • Did your project have your robot to grab, lift, and move an object?

  • Why is this sequence of movements important?