Teacher Tips
- Make sure that the students have selected the Clawbot Controller with Events Example project. You can point out to students that there are several selections to choose from on the Examples page from the File menu.
- You can ask students to add their initials or their name to the project name. This will help differentiate the projects if you ask the students to submit them.
Before you begin your project, select the correct example project. The Clawbot Controller with Events example project contains the Clawbot motors and sensors configuration. If the template is not used, your robot will not run the project correctly.
For more information about any of the instructions, visit the Python help section in VEXcode V5.
- Select File and Open Examples.
- Scroll through the different Example projects. Select the Clawbot Controller with Events example project.
- Name the project ClawbotController.
- Save the project.
- Check to make sure the project name ClawbotController is now in the window in the center of the toolbar. The Clawbot is now properly configured, and the Clawbot Controller with Events project is ready for use.
Now, take a look at how the instructions are being used in this project. In your engineering notebooks, make the following predictions:
- What’s happening when you run this project? What will the Clawbot be able to do?
- What would happen if we didn’t use the while and wait instructions in the callback functions for each controller button event?
Teacher Toolbox - Stop and Discuss
After students have finished answering the above question in their engineering notebooks, discuss their entries:
Answer Key
- Accurate predictions will explain that the Clawbot will be able to move forward, in reverse, and turn using the Joysticks, moving them up and down on the 2 and 3 positions. The Clawbot’s Arm will be able to move up and down using the L1 and L2 buttons, and the Claw will be able to open and close using the R1 and R2 buttons. Advanced responses may even predict that the Arm and Claw positions will hold in place when their buttons are not being pressed and their motors stop.
- The while and wait instructions in the callback functions, in this case, tells the Clawbot that when the L and R buttons are not being pressed, the Arm (L buttons) and/or Claw (R buttons) should stop. If the while and wait instructions were removed from the callback functions, those Motors would stop immediately after they were first told to spin.
If time permits, have students remove the while and wait instructions from the callback functions so they can see how it impacts their Clawbot’s behaviors.