Skip to main content

Lesson 3: Monitoring Sensor Values

In the previous Lesson, you used the Distance Sensor and comparison blocks for the VR Robot to drive from start to the number ‘1’ on the Wall Maze Playground. In this Lesson, you will learn how to monitor the values from sensors in the Monitor Console, and have the VR Robot drive from start to the letter ‘B’ on the Wall Maze Playground.

Letter B

Learning Outcomes

  • Identify that the value of the Distance Sensor can be monitored by selecting the checkbox next to the <Distance found object> or (Distance from) block, and then opening the Monitor console.
  • Describe the benefit of being able to monitor sensor values when creating VEXcode VR projects.

Start a New Project

  • Start a new project in VEXcode VR and name the project Unit5Lesson3.
    Start a new project

Drive to the Letter ‘B’

  • This Lesson will build a project for the VR Robot to drive to the letter ‘B’ on the Wall Maze Playground using the Distance Sensor.
    Letter B
  • Build the following VEXcode VR project. The goal of this lesson is to drive to the letter ‘B’, but the following project has an error.
    VEXcode VR project
  • Launch the Wall Maze Playground if it is not already open and run the project.
  • Notice that the VR Robot does NOT reach the letter ‘B.’ Why not? Run the project again to identify the error.
    Incorrect Ending Point
  • When the VR Robot reaches this point in the Wall Maze, the VR Robot needs to turn left to reach the letter ‘B.’ At this turn, the VR Robot is further away from the wall than other turns. The Distance Sensor can be used to allow the VR Robot to make turns at any distance away from a wall.

Select the Next button to continue with the rest of this Lesson.