Escape Room Passcode
Challenge: Your team is trapped on a digital planet, and you need to crack the passcode on the Canvas + playground to escape! The only clue you have is an Instruction Code, 2220033300222, where 0 represents moving North for 300 mm, 1 represents moving South for 300 mm, 2 represents moving East for 300 mm, and 3 represents moving West for 300 mm. The object of the activity is to develop an algorithm to drive the VR Robot from the Star Position to move around the playground following the instruction code and use the VR Pen to trace the path to crack the passcode. The fastest time wins!
- Download the Escape Room Passcode activity image as a PNG file from this Google slideshow.
- To learn more about downloading .png files from slideshows, see this article.
- Select the Art Canvas+ Playground and upload the Escape Room Passcode activity image.
- To learn more about uploading images to the Art Canvas+ Playground, see this article.
- Declare a list to store the Instruction Code data with each digital number as an item of the list.
- Declare an index variable to represent the item’s position within the list, and set the initial value to 1.
- Code the VR Robot to drive to the Star Position.
- Code the VR Robot to move around the playground following the Instruction Code and use the VR Pen to trace the path.
- Use the index variable to retrieve the value of an item in the list to get an instruction number.
- Use the [Turn to heading] block to code the VR Robot to turn in the desired direction based on the instruction number, and move the robot forward for 300 mm. Trace the path using the VR Pen.
- Increase the index variable by 1 to point to the next item’s position in the list.
- Use a loop to repeat the above steps for a set number of times to code the VR Robot to complete each instruction number in the Instruction Code.
- Monitor the list value and the variable value in the Monitor Console.
- Write down the cracked passcode on the Canvas + playground and share it with a friend.
Helpful Hints
- Use the set list to block from the Variables category to set every item in the list to the entered values.
- Matching Python command:

- Matching Python command:
- For help with storing data in the project, please select the “TUTORIALS” button in VEXcode VR and choose the Storing Data Tutorial.


- Use the item of block from the Variables category to report the value of an item in a list.
- Matching Python command:

- Matching Python command:
For more information about monitoring list values in VEXcode VR, please see this article.