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 this Unit, you will learn how to use the Front Eye Sensor and conditional statements to solve the Disk Maze Challenge. In the Disk Maze Challenge, the VR Robot will navigate through the Disk Maze Playground from start to finish using the Front Eye Sensor to detect colors.

On the Disk Maze Playground, a maze is created by positioning green, red, and blue disks and matching colored squares on the floor of the Playground so that the robot can navigate the maze by driving to each disk in succession. Watch the video below to see the VR Robot navigate the maze.

The robot starts on the green arrow near the lower left corner of the playground, opposite the first green disk. To navigate the maze, the robot drives forward to the green disk and turns right. It then drives to the next blue disk and turns left. The robot repeats this with the next three blue disks. Then the robot drives to the green disk and turns right, drives to the final blue disk and turns left, drives to the final green disk and turns right. The robot then drives and stops when the red disk is detected, indicating it has reached the end of the maze. The robot then turns right and drives to the start to repeat the maze. 

The Disk Maze Problem

Coding the VR Robot to navigate the Disk Maze can be done in a number of ways. The goal of the Disk Maze is to drive the VR Robot to each of the colored disks in the maze, ending at the red disk. In previous Units, you solved mazes uses while loops and sensor feedback to detect objects. Luckily, there are tools on the VR Robot, and in our code, that can help us detect colors to solve to the Disk Maze problem. You will learn about those tools in this Unit, beginning with the Eye Sensors in the next Lesson.