Lesson 2: Mini Challenge
Mini Challenge
For this mini challenge, create a project where the VR Robot drives from start to the number ‘1’ on the Wall Maze Playground using the distance sensor. This project will use multiple while loops with greater than (>) operators and get_distance commands.
For Your Information
The values reported by the Distance Sensor can also be monitored in the Monitor Console. Monitoring sensor values in the Monitor Console allows the user to view real-time reports of a specific value (or multiple values) in a project. Access the Monitor Window by selecting the Monitor icon next to the Help.
In this project, the Monitor Console can be used to view the values being reported by the get_distance command to help determine when the VR Robot needs to turn to successfully drive through the Wall Maze Playground.
To display the sensor values in the Monitor Console, in the first line of the project, drag in or type the monitor_sensor command as shown below. Type the identifier of the sensor as a string into the parameter of the command. For this project, the values displayed in the Monitor Console are from the Distance Sensor, and the string parameter will be "distance.get_distance".
For more information on how to use the Monitor Console, view this article.
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.
Video file - Create a project by adding or removing the necessary commands to the Unit5Lesson2 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 number ‘1.’
- Save the project once the VR Robot successfully drives from start to the number ‘1.’
Congratulations! You solved the mini challenge!