Skip to main content

Explore an Example Project

Did you know…

Did you know you can add more AI functionality and sounds to your VEX AIM Coding Robot? You've already seen the robot turn to an object, but it can also turn to an AprilTag. Using the AI Vision Sensor with AprilTags allows the robot to complete more complex tasks. Additionally, you may have noticed sounds playing while driving - you can also code the robot to play specific sounds during a project.

Let's explore an example project in VEXcode AIM to learn more…

You can choose from 30 different built-in sounds to make your robot show personality, express a feeling, or celebrate a success! 

You can control the sound it is playing with the Play Sound block. 

For more information on each sound, visit VEXcode API Reference.

play sound tada and a list of sounds

You can choose AprilTag IDs 0 through 4 in the Move to and Turn until block. 

move to AprilTag ID 1 block. With the dropdown of AIM Robot, AprilTag ID 0, AprilTag ID 1, AprilTag ID 2, AprilTag ID 3, AprilTag ID 4

AprilTag 0

What is an AprilTag?

AprilTags are patterned squares using two colors (generally black and white) that robots use to "see" and understand the world around them. Think of them like QR codes, but simpler, made specifically for robots to recognize quickly and accurately. When the AI Vision Sensor sees an AprilTag, it instantly knows exactly where it is and how it’s oriented, just like when you look at street signs to find your way around. Robots use this information to navigate, avoid obstacles, or even follow specific paths. For example, robots in factories use AprilTags to move parts from place to place, and drones can use them to land safely. AprilTags help robots become smarter and more reliable, allowing them to interact with their environment easily—even in places humans find tricky to reach!

The AprilTags in your kit are displayed on purple stands to make them easy to place around the field.

Example In Action

  • From the File menu in VEXcode AIM, select example projects. Then open the Move to AprilTag example project. 
  • Read the code – what do you think it will make the robot do when it is run? Is there a setup needed?
  • Record your prediction in your journal. 
  • Run the example project and observe the robot's behavior. How accurate was your prediction?

Move to apriltag icon and project name

Modify And Make It Your Own!

Modify the Move to AprilTag example project to:

  • Make the robot move to both AprilTag ID 2 and ID 4.
  • Have the robot play a different sound after completing each move.

Feel free to use any combination of sounds as well as emojis and LEDs to make your project unique to you! 

Share and Discuss

Share your project with the class! 

  • As you demonstrate your project, explain what blocks you used and why. 

Discuss your learning together.

  • How do you think moving to an AprilTag with the AI Vision Sensor could be useful in the unit challenge or future projects?

Select Next > to move on to the next lesson.