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.Forever block in VEXcode IQ, with the center of the C block empty.   
    • Here is an example of a [Break] block being used to exit a [Forever] loop.VEXcode IQ project beginning with a When started block with a forever block attached. Within the forever block is a Drive forward block and an if then block. The Condition of the If then block reads brain up button pressed? and within the C is a Break block. Outside the forever loop is a stop driving block.
  • The [Set motor velocity] blocks sets the speed of the motor. A Set motor velocity block in VEXcode IQ. The parameters are set to left motor and 50%.
    • The velocity can be set to either percent or rpm: A Set motor velocity block in VEXcode IQ with the parameter open to show percent or rpm. Percent is selected.
  • The [Spin] block spins a motor until stopped. The motor would be stopped by stopping the program. Spin block in VEXcode IQ with the parameters set to left motor and forward.
  • 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. Position of controller reporter block in VEXcode IQ with the parameter set to the A position.
    • 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