STEM Labs
Clawbot with Controller

Teacher Portal

Teacher Toolbox - Activity Outline

• This exploration will introduce students to Clawbot behaviors that can be programmed to operate with a Controller:
• Introduce the [Forever], [Set motor velocity], and [Spin] blocks
• Do a quick troubleshooting check that the Clawbot is ready
• Open VEXcode IQ
• Build a simple project provided within the lesson
• Have the students practice using the Controller
• Wrap up the activity with a discussion
• Using the Clawbot with Controller template enables the students to control the Clawbot using the Controller. There are four different blocks available in VEXcode IQ, which can be used to control the Clawbot’s motors. Students will need to adjust the parameters in the [Set motor velocity], [Spin], and (position of controller) blocks to control the velocity for each of the Clawbot’s motors and enable the Controller to control the motor functions.

• As a whole class activity, review the programming blocks with the students. Tell the students that there are four different blocks available in VEXcode IQ, which can be used to control the Clawbot’s motors. Students will need to adjust the parameters in the [Set motor velocity], [Spin], and (position of controller) blocks to control the velocity for each of the Clawbot’s motors and enable the Controller to control the motor functions.

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.

• Here is an example of a [Break] block being used to exit a [Forever] loop.

• The [Set motor velocity] blocks sets the speed of the motor.

• The velocity can be set to either percent or rpm:

• The [Spin] block spins a motor until stopped. The motor would be stopped by stopping the program.

• 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.

• 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.

Teacher Tips

• If this is the students' first time using VEXcode IQ, they can reference the Tutorials at any time during this exploration. The Tutorials are located in the Toolbar.
• Make sure each student group has all of the necessary materials.

Teacher Toolbox - Students' Exploration Roles

For help organizing students for this activity click below.

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

1

Controller

1

Tether Cable

1

VEXcode IQ

1

USB Cable (if using a computer)

1

Engineering Notebook