Moving the Claw#
This tutorial covers how to move the claw on your VEX IQ Clawbot in VEXcode IQ (2nd gen). 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, Claw Motor version of the Clawbot build, so you see the ClawMotor blocks in the toolbox.
Attach the spin motor for block to the when started block. This closes the claw.
when started
spin [ClawMotor v] [close v] for (90) [degrees v] ▶
Attach a wait block below it, to pause before opening the claw again.
when started
spin [ClawMotor v] [close v] for (90) [degrees v] ▶
wait (1) seconds
Attach another spin motor for block below the wait block.
when started
spin [ClawMotor v] [close v] for (90) [degrees v] ▶
wait (1) seconds
spin [ClawMotor v] [close v] for (90) [degrees v] ▶
Change its direction parameter to open, to open the claw back up.
Make sure your robot is connected to VEXcode, then select Download to download the project to the Brain.
Select Run to run the project. This project will now close the claw, wait, then open it again.