Skip to main content

Clawbot is ready for programming with the Controller! This exploration will give you the tools to be able to program some basic movements within a project.

VEXcode IQ that will be used in this exploration:

  • The [Forever] block—this block loops a set of blocks forever. A [Forever] loop can only be exited by using a break block or by stopping the program. The [Forever] block will not stop repeating unless a break block is placed inside of it.image of a forever block in VEXcode IQ   

    • Here is an example of a [Break] block being used to exit a [Forever] loop.image of an example code snippet where a break block is used to exit a forever loop

  • The [Set motor velocity] blocks sets the speed of the motor. Image of the set motor velocity block in VEXcode IQ

    • The velocity can be set to either percent or rpm: image of the set motor velocity block with parameter drop down open to show % or rpm

  • The [Spin] block spins a motor until stopped. The motor would be stopped by stopping the program. image of the spin motor block in VEXcode IQ

  • The (position of controller) block reports the position of the Joystick on the Controller along an axis. The Joystick beings 0 when centered on the axis. image of the position of controller block in VEXcode IQ

    • This block will enable the Controller to determine a motor's velocity.  To do so, drag this block from the Toolbox over the velocity in the [Set motor velocity] block; this will replace the default velocity with the Controller position of your choosing.

To find out more information about any of these blocks, open Help, and select the block(s) about which you have questions.

The Builder in each group should get the hardware required. The Recorder should get the group's engineering notebook. The programmer should open VEXcode IQ.

Materials Required:
Quantity Materials Needed
1

Clawbot

1

Charged VEX IQ Robot Battery

1

VEX IQ Radio

1

Controller

1

Tether Cable

1

VEXcode IQ

1

USB Cable (if using a computer)

1

Engineering Notebook