Skip to main content
Teacher Portal

Design, Develop, and Iterate on your Project

In this section, you will use the projects that you build in the Play section to create a project that can manipulate both the arm and the claw.

Recall the ArmUpDown2 and the ClawUpDown projects.

Arm Up Down 2 VEXcode project to the left and Claw Up Down VEXcode project to the right.

We want to somehow incorporate both of these projects into the same project. However, there is only one Brain Up button and one Brain Down button.

Thus, we need a button to act as a "switcher" between the arm and claw.

Use the following outline of blocks to help you build your project:

Code snippets from VEXcode projects in this Unit to be used like sentence starters to help begin the project. The 4 snippets are A When started block with a forever block, an if then else block with the condition set to Brain check button pressed; the If then else structure to move the arm up and down with the Brain up and down buttons, and the If then else structure to do the same for the Claw motor.

Answer the following questions in your engineering notebook as you plan your project:

  1. What do you want to program the robot to do? Explain with details.
  2. How many conditions will your project need to check in the [If then else] blocks?

Hint: Use the Brain Check button as the "switcher" between the arm and the claw. Thus, if the Brain Check button is pressed and held, the arm is controlled using the Brain Up and Down buttons. If the Brain Check Button is released, the claw is controlled using the Brain Up and Down buttons.

Follow the steps below as you create your project:

Teacher Tips icon Teacher Tips

  • Before moving on to the next step of programming, have students review and evaluate their pseudocode by following the steps in the context of pressing the brain's buttons. Click here (Google / .docx / .pdf) for an example of what the pseudocode might look like for this challenge. You can download a pseudocode rubric here (Google / .docx / .pdf).

  • Remind students that they can use the Help feature inside of VEXcode IQ to learn more about any block.

Teacher Toolbox icon Teacher Toolbox

  1. The objective is to add additional programming so that the Clawbot opens or closes the claw at the press of a button(s) on the Clawbot's brain (i.e., one button or pairing of buttons for opening the claw and another for closing the claw). The programming for raising and lowering the Clawbot's arm by pressing buttons on the brain should have already been built during the Play section.

  2. This question is intended to get the students thinking about the conditionals needed inside the [If then else] blocks. The User Interface will require five conditions to be checked. The first condition checked is if the Check button is pressed. If the Check button is pressed, the next conditions to check is if the Up button is pressed (Condition 2) or if the Down button is pressed (Condition 3). If the Check button is not pressed, the project moves down to check if only the Up button is pressed (Condition 4) or if the Down button is pressed (Condition 5).

  1. Plan out the conditions that your project needs to check using drawings and pseudocode.

  2. Use the pseudocode you created to develop your project.

  3. Test your project often and iterate on it using what you learned from your testing.

  4. What could you add to your project to better control the Claw and Arm Motors? Explain with details.

  5. Share your final project with your teacher.

Teacher Tips icon Teacher Tips

Encourage students who are having trouble programming to review the If Then Else Blocks tutorial video in VEXcode IQ. They should also use their ArmUpDown2 and the ClawUpDown projects from Play as the basis for this new project. Students have been provided with a list of potentially helpful sources to use as references.

Tutorial icon reads If then else blocks on the bottom and shows an outline of an if then else block with arrows above.

If you're having trouble getting started, review the following in VEXcode IQ Blocks:

  • If-Then-Else Blocks or Using Loops tutorial videos

Tutorial icons side by side. The icon on the left reads Using Loops and the one on the right reads If then else blocks.

  • Using Help tutorial video

Tutorial icon that reads Using Help on the bottom and shows the outline of a block being selected and help open above.

  • Previous versions of your project (ArmUpDown2 or ClawUpDown)

VEXcode IQ Toolbar with the Tutorials icon called out in a red box, to the right of the File menu.

Extend Your Learning icon Extend Your Learning

Ask students to incorporate the Touch LED or have the robot play a sound when the buttons are switched between the arm and claw. The students could also have the Touch LED light up green when the arm is being controlled and light up blue when the claw is being controlled.

The following is an example solution:

Sample solution project with a forever block attached to the When started block. Within the forever block is an if then else block with nested if then else blocks within it. The If branch reads If brain check button pressed then set touch led to green, if brain up button pressed, then spin arm motor up, else, if brain down button pressed then spin arm motor down, else stop arm motor. The else branch reads set touchled to blue, if brain up button pressed then spin claw motor open, else, if brain down button pressed then spin claw motor close, else stop claw motor.