Lesson 5: Disk Maze Challenge
In this Disk Maze Challenge, the VR Robot will navigate the Disk Maze Playground from start to finish using the Eye Sensor. The VR Robot also must drive back to the starting position and begin the Disk Maze again, in order to solve the Disk Maze Challenge forever!
Learning Outcome
- Apply blocks from the Drivetrain, Sensor, and Control categories to be able to solve the Disk Maze Challenge.
Putting It All Together
The [If then] block is a C block from the Control category. If the condition of the [If then] block reports TRUE, then the VR Robot will perform a set of behaviors contained within the [If then] block. The behaviors inside of [If then] block will be skipped if the condition of the [If then] block reports FALSE.
The [Forever] block is a C block from the Control category that repeats the behaviors contained inside of it, forever.
[If then] blocks are used inside of [Forever] blocks in order for each condition of the [If then] blocks to be checked repeatedly. During the flow of the project, if the condition of the [If then] block is TRUE, the blocks inside of the [If then] block are executed. If the condition of the [If then] block is FALSE, the blocks inside of the [If then] block are skipped, and the flow of the project will continue to the next block in the stack.
Using [If then] blocks inside of [Forever] blocks allows a VR Robot to respond accordingly to its environment, such as stopping or turning when a VR Robot detects an object of a certain color.
Select the Next button to continue with the rest of this Lesson.