Skip to main content

Using the Distance Sensor

The Distance Sensors on Moby's Forks can be used to help complete the challenge in this Lesson to pick up two Rings from the marked cluster on the Field, and drop them in the highlighted Neutral Mobile Goal. 

image of field highlighting the closest cluster of rings and the bottom neutral mobile goal

There are three Distance Sensors on Moby, one on each Fork, and one in the center of the Forks. The sensor on each Fork can be used to detect when a Ring, or Rings, are loaded onto the Fork.

For more information about the V5 Distance Sensor, see this Knowledge Base article.

distance sensors on Moby

In this example, the Distance Sensor on the left Fork is used to detect when a Ring is less than 25mm away from the sensor.

Once there is an object (a Ring) less than 25mm from the Distance Sensor, Moby will stop driving and lift the Forks to hold the Ring(s). It will then turn and drop the Ring(s) in the Neutral Mobile Goal Base.

Image of VEXcode V5 project using the distance sensor for Lesson 4

Select Return to Lessons > to go back to the Lesson Overview. 

Select Next Lesson > to continue to Lesson 5, and learn how to balance Moby on the Platform to score more points.