Lesson 2: Using Multiple [Wait until] Blocks
- To drive through the Wall Maze Playground, the VR Robot will need to turn and keep driving when there is a collision with a wall. Remove the [Stop driving] block and replace it with a [Turn for] block. Change the [Turn for] parameter to “left.”
- Launch the Wall Maze Playground if it is not already open and run the project.
- Watch the VR Robot drive from the start of the Wall Maze, stop when the Bumper Sensor is pressed by the wall, and turn left 90 degrees.
- Multiple [Wait until] blocks can be used in the same project. Starting from the current position of this VR Robot, the next step in solving the Wall Maze would be to drive forward to the next wall and turn right 90 degrees. The existing stack of blocks can be duplicated and added to the bottom of the stack. Remember to change the second [Turn for] block from left to right.
- Reset the Wall Maze Playground and run the project again.
- Watch the VR Robot drive from the start of the Wall Maze, stop when the Bumper Sensor is pressed by the wall, turn left 90 degrees, drive forward until the Bumper Sensor is again pressed by a wall, then turn right 90 degrees and stop.
For this mini challenge, create a project where the VR Robot drives from start to the letter ‘A’ on the Wall Maze Playground using multiple [Wait until] blocks and the Bumper Sensor!
Follow these steps to complete the mini challenge:
- Watch the solution video to see how the VR Robot should drive in order to complete the mini challenge.
- Create a project by adding or removing the necessary blocks to the Unit4Lesson2 project.
- Start the project to test it.
- If the project is not successful, edit and try again. Continue to revise and run the project until the VR Robot successfully drives from start to the letter ‘A.’
- Save the project once the VR Robot successfully drives from start to the letter ‘A.’
Congratulations! You solved the mini challenge!