Skip to main content
Teacher Portal

Teacher Toolbox icon Teacher Toolbox - The Purpose of this Section

The goal of the Rethink section is for students to use buttons on the Controller using event-based programming.

This section includes:

  • Event-Based Programming Overview

  • Example Project Download Instructions & Overview

  • Remix Activities:

    • Grab an Object!

    • Colored Gems

    • Relay Race!

  • Remix Questions

Teacher Tips icon Teacher Tips

  • The Controller can be paired with the Robot Brain before class to save time. Decide whether you want to complete this step or if you would like students to do so. Follow the steps here. You can have this article printed out for students to use, if you want them to pair the Controller to the Brain.

  • Event-based programming gives the Clawbot the ability to trigger events or react to triggers. This type of programming enables one instruction to communicate with other instructions.

    In other words, the Clawbot responds to the movements of the Controller’s Joysticks. The movement of the Joystick is the trigger, and the Clawbot responds accordingly.

A simple text program that spins the arm motor up when the controller L1 button is pressed

In the above example, pressing the L1 button is the trigger that spins the ArmMotor up.

To learn more about the instructions, open the C++ help information.

A small dog sits on a doormat with a coiled leash in front of it, looking at the camera as though asking if it is time to go out.

Event-based programming

If your dog brings you his leash or sits by the door, he’s letting you know that he needs to go outside. In school, when your teacher asks a question and sees you raise your hand, they believe you know the answer and would like to answer the question. These behaviors are also known as “triggers.”

Your dog knows that bringing you his leash or sitting by the door is the trigger that lets you know he needs to go outside. So, when you see him sitting by the door with his leash, you react to the trigger by taking him outside. Raising your hand is the trigger that lets the teacher know you would like to answer the question. The teacher then reacts to the trigger by calling upon you.

Event-based programming in robotics is when certain robot behaviors trigger the robot to do certain things or react to certain triggers.

Teacher Toolbox icon Teacher Toolbox - Reviewing the Instructions

  • Ask students to open the Clawbot Controller with Events example project in VEXcode V5.

Example project icon reads Clawbot with Controller at the bottom and shows a blue controller with a clawbot above.

  • As a whole class activity, review the programming instructions with the students. Tell the students that multiple events within the Clawbot Controller with Events project can be triggered at the same time, enabling them to control the Clawbot’s driving movement as well as the movement of the Clawbot’s Arm and Claw.

Controller: Clawbot Control

Now, you’re ready to download the C++ Clawbot Controller with Events example project and use the Controller to operate the Clawbot, its Arm, and its Claw, all at the same time!

An Icon reads Clawbot Controller with Events on the bottom with a blue Controller with clawbot above.


Ensure you have the hardware required and your engineering notebook. Open VEXcode V5.

 
Materials Required:
Quantity Materials Needed
1

Clawbot

1

Charged Robot Battery

1

VEX V5 Radio

1

Controller

1

Tether Cable

1

VEXcode V5

1

USB Cable (if using a computer)

1

Engineering Notebook

Before you begin the activity...

Do you have each of these items ready? The Builder should check each of the following:

  • Are all the motors and sensors plugged into the correct port?

  • Are the smart cables fully inserted into all of the motors?

  • Is the battery fully charged?

  • Is the Controller paired with the Robot Brain?