The Tunnel Maze

Use [Drive] and [Turn for] blocks, the Front Distance Sensor, and the Down Eye Sensor to drive the VR Robot from the Start Position (green square) to the End Position (red square) on the Maze+ Playground.
- Select the Wall Maze+ Playground.
- Download the .vrmaze file from this folder and upload the maze in the Playground.
- For help with uploading and downloading mazes in the Wall Maze + Playground, see this article.
- Code the VR Robot to drive from the Start Position (green square) to the End Position (red square).
- Create an algorithm to use the Front Distance Sensor to navigate the VR Robot moving in the maze without running into a wall.
- Use the Down Eye Sensor to check for the red color to determine if the VR Robot arrives at the End Position.
- Use the [ Forever] block to keep the VR Robot constantly moving in the maze, and keep the Down Eye Sensor constantly checking for the End Position to stop the robot.
Helpful Hints
Use the Down Eye detects block from the Sensing category to report if the Down Eye Sensor detects a specific color.
Matching Python command:
down_eye.detect(RED)
Use the Front Distance Sensor to determine if the VR Robot nears the wall. Use the Less Than comparison block from the Operators category to report if the distance between the VR Robot and the wall of the maze is less than a threshold value to determine if the VR Robot nears the wall.
Matching Python command:
front_distance.get_distance(MM) < 200
Use the if then else block from the Control category to check if the VR Robot nears the wall, and run the code to perform various behaviors based on the Boolean condition. If the Boolean condition is true, the blocks inside of if section will be run. If the Boolean condition is false, the blocks inside of else section will be run.
Matching Python command:
if condition: pass else: pass
Use the break block from the Control category to exit a repeating loop immediately.
Matching Python command:
break