Skip to main content
Teacher Portal

Using a Sensor to Move Disks

Teacher Toolbox icon Teacher Toolbox - Activity Outline

In this activity, students will begin to automate their VEX V5 Workcell by using the Optical Sensor. They will find the coordinates of where to hold a disk over the Optical Sensor in order to add a location point. This location point is used so that the arm mounted on the V5 Workcell stops over the Optical Sensor to detect the color of the disk.

Rather than using the colored boxes on the V5 Brain’s screen, the color detected by the Optical Sensor will trigger the arm mounted on the V5 Workcell to move and drop off disks to the matching colored drop off location. Students will explore how to use an [If then] block to determine how the arm mounted on the V5 Workcell should move when each color is detected.

Students will complete the activity by successfully moving all three colored disks (red, green, and blue) to their accompanying drop off location using the Optical Sensor.

Materials Required:
Quantity Materials Needed
1

VEX V5 Workcell

1

VEXcode V5

1

Engineering Notebook

1

Device to run VEXcode V5

1

Micro-USB cable

3

Colored Disks (1x red, 1x blue, 1x green)

Teacher Tips icon Teacher Tips

  • Ensure the V5 Battery is charged before beginning.
  • Ensure the V5 Brain is connected to a device before beginning.
  • Point students to the VEX Robotics Knowledge Base if they have further questions about VEXcode V5 or the hardware.
  • Ensure students have their mastering values readily available from Lab 1.
  • Ensure the students change the [Set tool] block to ‘electromagnet.’ If this is missed, the arm mounted on the VEX V5 Workcell may not move as intended.
  • Remind students that the z-coordinate value should raise the arm mounted on the V5 Workcell up enough to not collide with any standoffs, especially when transporting a disk.
  • Students may need to adjust the location values multiple times when testing to obtain a more accurate location.
  • Ensure the Optical Sensor is added to the robot configuration before testing. Different lighting conditions could affect the sensor’s readings. If the Optical Sensor is not performing as intended, test it in a more light conducive location.

In this section, you will begin to automate their VEX V5 Workcell by using the Optical Sensor. They will find the coordinates of where to hold a disk over the Optical Sensor in order to add a location point. This location point is used so that the arm mounted on the V5 Workcell stops over the Optical Sensor to detect the color of the disk.

Rather than using the colored boxes on the V5 Brain’s screen, the color detected by the Optical Sensor will trigger the arm mounted on the V5 Workcell to move and drop off disks to the matching colored drop off location. You will explore how to use an [If then] block to determine how the arm mounted on the V5 Workcell should move when each color is detected.

You will complete the activity by successfully moving all three colored disks (red, green, and blue) to their accompanying drop off location using the Optical Sensor.

You will begin by locating coordinates.