Time to build onto your Button Coding skills! In this lesson, you’ll code your VEX AIM Coding Robot to collect and place barrels at a target location—starting with one, then adding on to tackle a second. As you build and test your code, you’ll see why breaking a big task into smaller steps makes a difference.
Watch the video below to learn how to pick up and place objects with Button Coding.
Now that you have watched the video, capture your thoughts in your journal. Answer these questions to guide your thinking and help you prepare for a whole-class discussion:
- Explain how to pick up and place a barrel using Button Coding. Be specific in your description.
- What did you see in the video to support your description?
- Write down at least two questions that you have about moving a barrel with Button Coding.
- Do you think there are other ways to approach moving the barrel with Button Coding? Why or why not?
Guided Practice
Now that you have watched and discussed the video, it is your turn to practice!
Step 1: Set up the Field as shown below.

Step 2: Start the activity.
- Your task is to plan and code the robot to pick up the orange barrel and place it in front of AprilTag ID 0, then add to your project to place the blue barrel as well.
- Use this task card (Google / .docx / .pdf) to guide your practice.
- Pro Tip: Think about how the magnet on the kicker is going to interact with the barrel when you plan your path. Be sure to code the robot to drive directly into the barrel in order to collect it successfully.
Resources for Practice:
The article linked here is available if you need additional support while completing the activity.
Wrap-Up
Now that you have practiced coding and testing your project, it is time to share what you learned. Answer the following questions in your journal to help you reflect on your learning and prepare for a whole-class discussion:
- How did you move your robot to complete the task?
- Why do you think your strategy was successful? Use evidence from your journal to support your claim.
- What is something you learned while problem solving through a challenge during practice? How does that change your thinking about using Button Coding?
Select Next > to move on to the unit challenge.