Skip to main content
Teacher Portal

Controller Exploration - Part 1

Teacher Toolbox icon 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
    • Download and run the project
    • 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.
  • For more information about programming the Controller, click below.

    Google Doc / .docx / .pdf

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

Teacher Tips icon 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. VEXcode IQ Toolbar with the Tutorials icon called out with a red arrow, to the right of the File menu.
  • Make sure each student group has all of the necessary materials. 

Teacher Toolbox icon Teacher Toolbox - Students' Exploration Roles

For help organizing students for this activity click below.

Google Doc / .docx / .pdf 

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