Moving the Claw#

Moving the Claw

This tutorial covers how to move the claw on your VEX V5 Clawbot in VEXcode V5. By the end, you’ll have a project that closes the claw, waits, then opens it again.

Make sure your robot is configured with the Drivetrain, Inertial version of the Clawbot build, so you see the ClawMotor blocks in the toolbox.

  1. Attach two spin motor for blocks below the when started block.

Two spin motor for blocks, spinning the ArmMotor by default.#
    when started
        spin [ArmMotor v] [up v] for (90) [degrees v] ▶
        spin [ArmMotor v] [up v] for (90) [degrees v] ▶
  1. Change both of their motor parameters to ClawMotor so they control the claw.

Screenshot of two spin motor for blocks, with the second block's motor dropdown open, showing ArmMotor and ClawMotor options, and ClawMotor selected.
  1. Attach a wait block between the two blocks, to pause before opening the claw again.

A wait block, between the two spin motor for blocks.#
    when started
        spin [ClawMotor v] [close v] for (90) [degrees v] ▶
        wait (1) seconds
        spin [ClawMotor v] [close v] for (90) [degrees v] ▶
  1. Change the direction parameter of the second spin motor for block to open, to open the claw back up.

Screenshot of the finished project, with the second spin motor for block's direction dropdown open, showing close and open options, and open selected.
  1. Make sure your robot is connected to VEXcode, then select Download to download the project to the Brain.

Screenshot of the VEXcode toolbar with the Download button highlighted.
  1. Select Run to run the project. This project will now close the claw, wait, then open it again.

Screenshot of the VEXcode toolbar with the Run button highlighted.