Now that you've explored the VEX AIM Coding Robot's AI Vision—and learned about its field of view and the factors that affect the data it reports—it's time to apply that knowledge to a new challenge! In this activity, you will build a project to make your robot react differently depending on what object is detected.
Watch the video below to see the code you will be starting with, and learn about how the blocks in that project connect to what you've learned in your explorations. In this video, you will review the challenge and learn about:
- AI Vision blocks that allow you to use sensor data in a project.
- How the starter project is structured.
Now that you have watched the video, capture your thoughts in your journal. Answer the questions below to guide your thinking and help you prepare for a whole-class discussion.
- What are your initial ideas for how to complete the activity? List at least two ideas in your journal, with details.
- How do you think what you learned in the explorations will help you to complete this challenge?
- What other questions do you have about the code or the challenge?
Now that you have watched the video, capture your thoughts in your journal. Answer the questions below to guide your thinking and help you prepare for a whole-class discussion.
- What are your initial ideas for how to complete the activity? List at least two ideas in your journal, with details.
- How do you think what you learned in the explorations will help you to complete this challenge?
- What other questions do you have about the code or the challenge?
After students have watched the video, come together for a whole-class discussion. Use students' answers to the questions to get the conversation started.
The goal of this conversation is to bridge from the explorations students completed to applying their learning in a coding project. Remind students that they learned about how the environment affects AI Vision through their explorations. Brainstorm ways students can apply their learning to help them problem solve when their project doesn't work as expected. Encourage students to think about their explorations as troubleshooting strategies.
Take time to review the challenge itself and the code students will be working from to ensure everyone understands how to get started. Remind students of the resources in VEXcode AIM as well as their classmates, journals, and classroom documentation from the course that can help them when they are feeling stuck. You may want to establish a rule like “Three Before Me”, so that students know to try three different resources before coming to you with questions for this challenge.
Putting It All Together
Now that you've discussed the activity, it's time to try it!
Step 1: Set up your field. Place one object in the center of each wall, and your robot in the center of the field. Use the image below as a guide. You can use blue and orange barrels, and sports balls.
Step 2: Plan your project to make the robot react differently depending on the object detected. Together with your group, choose how you want your robot to react to each of the objects on your field. Document your plan in your journal, and be specific.
- Use this task card (Google / .docx / .pdf) to guide you as you complete the activity.
- Be creative—use emojis, LEDs, built-in sounds, or other actions to design your robot's reactions.
Step 3: Code your robot to complete the activity, making sure it reacts differently depending on the object detected. Continue to use your task card. Build the project shown below to get started.

- Pro Tip: Use the built-in VEXcode resources to learn more about what blocks to use to build a project that matches your plan. You can check out Example Projects, or view the Help for specific blocks, to help if you get stuck or need ideas.
Step 4: Explore! Try different objects in each location. Does your project still work as intended? Think about how you can further customize your reactions, then continue to iterate on your project to improve it.
Additional Resources
The following articles and resources may help you as you work through this challenge:
Now that you've discussed the activity, it's time to try it!
Step 1: Set up your field. Place one object in the center of each wall, and your robot in the center of the field. Use the image below as a guide. You can use blue and orange barrels, and sports balls.
Step 2: Plan your project to make the robot react differently depending on the object detected. Together with your group, choose how you want your robot to react to each of the objects on your field. Document your plan in your journal, and be specific.
- Use this task card (Google / .docx / .pdf) to guide you as you complete the activity.
- Be creative—use emojis, LEDs, built-in sounds, or other actions to design your robot's reactions.
Step 3: Code your robot to complete the activity, making sure it reacts differently depending on the object detected. Continue to use your task card. Build the project shown below to get started.

- Pro Tip: Use the built-in VEXcode resources to learn more about what blocks to use to build a project that matches your plan. You can check out Example Projects, or view the Help for specific blocks, to help if you get stuck or need ideas.
Step 4: Explore! Try different objects in each location. Does your project still work as intended? Think about how you can further customize your reactions, then continue to iterate on your project to improve it.
Additional Resources
The following articles and resources may help you as you work through this challenge:
Remind students of shared expectations for collaborative coding and discussions before beginning.
Distribute the Putting It All Together task card (Google / .docx / .pdf) to each student. Students will use the same task card for the whole activity. They should first plan their projects with their groups then check in with you to share their plans before beginning to code.
When you check in with students about their project plans, ensure their plans are specific and collaborative. Ask questions like:
- What behaviors are you using to make each reaction unique? How did you decide on those together?
- What blocks do you think you will use to code those behaviors?
- What data from the robot's AI Vision will you use in this project? How have you documented that?
As students are building and testing their projects, circulate around the room and engage in discussions about their process and progress. Ask questions like:
- What reaction(s) have you coded so far? What is your next step?
- What challenges are you facing in creating this project? How are you trying to solve those problems?
- What AI Vision data is being used in this project? How do you know?
- What is something you learned during the explorations that you are applying to this challenge? How is it helpful?
This challenge encourages productive struggle—and that’s okay. Remind students that they can look to other groups' projects, talk with other students, and reference their own journals as they are working through the activity. If you find that several groups are having the same issue, you may want to pause everyone and come together for a whole-class check in. Utilize example projects, tutorials, and the Help in VEXcode AIM to help students learn about the blocks in their project.
Learn more about supporting students and their learning during productive struggles in this VEX PD+ Insights article.
Wrap-Up
Now that you have completed the activity, it is time to share how you applied what you learned about the robot's AI Vision to this coding challenge. Answer the following questions in your journal to help you reflect on your learning and prepare for a whole-class discussion:
- Describe your project. Include what AI Vision blocks were used and the reactions you coded.
- What learning did you apply from the AI Vision explorations to create this project?
- What was the biggest challenge your group faced? How did you work together to solve it?
Now that you have completed the activity, it is time to share how you applied what you learned about the robot's AI Vision to this coding challenge. Answer the following questions in your journal to help you reflect on your learning and prepare for a whole-class discussion:
- Describe your project. Include what AI Vision blocks were used and the reactions you coded.
- What learning did you apply from the AI Vision explorations to create this project?
- What was the biggest challenge your group faced? How did you work together to solve it?
Guide students to share their learning and projects in a whole-class discussion. Invite students to demo their projects to compare and contrast the different reactions they coded with one another.
Use the questions students answered in their journals as a starting point for sharing and discussion. Ask follow up questions to guide student understanding:
- On the reactions students coded:
- What combinations of behaviors did you choose? Why?
- What other behaviors could you have used? Is there an advantage to one over the other?
- On applying the explorations:
- How did your knowledge of the field of view help you with this activity?
- How did what you learned about light or other environmental factors help you to be successful?
- How did you use AI Vision feeds like the Utility or Dashboard as you built and tested your project?
Encourage students to connect their discussion points back to the learning targets that they co-created at the start of the unit. Record any questions students still have about AI Vision that come up during the discussion.
Select Return to Units > to return to all units.