Skip to main content

Introduction

Using Python with VEXcode VR requires a VR Enhanced or Premium license. Make sure you are logged in with your class code and that the VR Logo in the top left corner is grey or gold. 

In the Wall Maze Challenge, you will use VEXcode VR Python to navigate the VR Robot through the Wall Maze Playground from start to finish. You will learn how to use the Bumper Sensor and the while loop to solve the Wall Maze Challenge.

In the video clip below, the VR Robot begins at the maze start in the bottom center of the Playground, and navigates to the finish in the top center. To solve the maze, the robot drives until it bumps into a wall, then reverses and turns to navigate in the open paths. The VR Robot begins by driving forward and reversing and turning left three times, to get around the first walls. It then reverses, drives forward and turns right two times to get to the center of the maze. To get around the last set of walls, the robot reverses, drives forward, and turns left 3 times, then finally, it turns right, drives, reverses, turns left, and drives to the finish.

The Wall Maze Problem

Coding the VR Robot to navigate to locations within the Wall Maze can be done in a number of ways. However, without knowing the exact distances or dimensions of the maze, using commands like drive_for can be tricky. Luckily, there are tools on the VR Robot, and in our code to help us solve the maze problem. You will learn about those tools in this Unit, beginning with the Bumper Sensor in the next Lesson.