Skip to main content

Lesson 1: The Eye Sensor and the Disk Maze Problem

Using Eye Sensor Data with the Disk Maze Problem

The Eye Sensors on the VR Robot can be used in many ways. Note that the Down Eye Sensor does not detect the floor of a Playground as an object. Other items, such as disks, will register as objects. The Front Eye Sensor does detect walls in the Playgrounds, as well as raised objects, like disks or castles.

The Eye Sensors can detect the color of an object near the sensor, such as the colored disks in the Disk Maze Playground. This is useful if you want the VR Robot to sort differently colored objects, drive up to a specifically colored object, or perform different behaviors based on the color of an object detected.

For instance, in this project, the VR Robot will drive to the first disk in the Disk Maze, then turn to face the next disk. The VR Robot will drive forward while the Front Eye Sensor does not detect a green object. Once a green object is detected, the VR Robot will turn right.

Video file

The data from the Front Eye Sensor and Down Eye Sensor is reported in the Dashboard in real time, as the project is running. Notice that the Front Eye Sensor detects both the object (the disk) and the color (green) when it approaches the disk.

Front eye

The Down Eye Sensor detects the color of the floor (green), but as there is not an object on the floor of the Playground, that value is reported as False. 

Down eye

You can use the data reported in the Dashboard at any time to help visualize the data that the Eye Sensors are reporting in real time. 

Questions

Please select a link below to access the lesson quiz.

Google Doc / .docx / .pdf