Skip to main content

Lesson 3: Drive to Number ‘31’

In this Lesson, the VR Robot will drive to the number ‘31’ and then back to number ‘1’ on the Number Grid Map Playground!

number-grid-map-playground-31

Notice that the VR Robot will be traveling along the Y axis to move to the number ‘31’ on the Number Grid Map Playground.

L3_x-axis-go-to-31

The VR Robot will drive to the location of the number ‘31’ on the Number Grid Map Playground. However, before the VR Robot can navigate to that number, the VR Robot has to be told where that number’s location is. The coordinates of number ‘31’ are (-900, -300).

L3_x-axis-go-to-31-with-arrows01
  • Drag the [Drive] non-waiting block into the workspace.
    drag-[drive]
  • Attach a [Wait until] block beneath the [Drive] block.
    drag-[wait-until]
  • Drag the <Greater than> Boolean reporter block into the [Wait until] block.
    drag-_greater-than_
  • Note that the <Greater than> block is used instead of the <Less than> block because the VR Robot is driving up from the bottom of the Playground. The VR Robot is starting at a Y-value of -900 millimeters (mm). As the VR Robot drives forward, the Y-values increase.
    L3_x-axis-go-to-31-with-arrows01
  • Drag the (Position of Robot) block into the <Greater than> block.
    drag-in-position-of-block
  • Set the parameter of the (Position of Robot) block to “Y” and the parameter of the <Greater than> block to -300.
    parameters-of-position-of-robot-block
  • Drag in a [Stop driving] block and add it to the project.
    add-in-stop-driving-block
  • Launch the Number Grid Map Playground if it is not already open and run the project.
  • Watch the VR Robot drive to number ‘31’ on the Number Grid Map Playground.
    L3_robot-on-31
  • In this project, the VR Robot drives to the number ‘31’ on the Number Grid Map Playground. Since the Y-values are increasing as the VR Robot drives to the number ‘31,’ the project uses a <Greater than> block.
  • The VR Robot will stop once its Y-value is greater than the Y-value of the coordinate that the indicated number is on. Since the Y-value of the number ‘31’ is -300, the VR Robot will stop driving once the Y-value is greater than -300.
project-flow-unit-6-lesson-3-part-1

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