Skip to main content

Hidden Pixel Art

Challenge: A Hidden Pixel Art is under the gold-colored roof in the Hidden Pixel Art Playground. Each pixel measures 200mm by 200mm, and the entire Hidden Pixel Art is 8 pixels by 8 pixels. The pixels will either be green or blue. The object of the activity is to code the VR Robot to drive around the entire Playground to discover the Hidden Pixel Art by using the Down Eye Sensor to detect the color of each pixel and record the color information in a 2D list. Use the Reveal Answer button to check your solution!

  • Select the Hidden Pixel Art Playground.
  • Select a Puzzle.
  • Declare a variable to track the column index. Declare a variable to track the row index.
  • Declare a 2D list with 8 rows and 8 columns to store the color information.
  • Code the VR Robot to detect the color of each pixel and record the color information in a 2D list.
    • Move the robot forward into a pixel.
    • Record the color detected by the Down Eye Sensor in the 2D list, using “1” to represent green and using “0” to represent blue.
    • Use a loop to repeat the above steps for a set number of times to record the color of each pixel in a column.
    • Code the VR Robot to drive to the next column.
    • Use a loop to code the VR Robot to repeat the actions for a set number of times to record the color of each pixel in each column. 
  • Monitor the list value and the variable values in the Monitor Console.
  • Use the [print] block to print the list value and the variable values to the Print Console. 
  • Use the Reveal Answer button to check your solution!

Helpful Hints

  • To select a Puzzle in the Hidden Pixel Art Playground Playground, select the menu button, then select the choose puzzle button.

Menu

Location

  • The solution can be found using the Reveal Answer button after the VR Robot has navigated around the entire Playground surface under the gold colored roof.

Reveal Answer

  • For help with storing data in a 2D List, please select the “TUTORIALS” button in VEXcode VR and choose the Storing Data Tutorial.

Tutorials

Storing Data Tutorial

  • Use the replace item block from the Variables category to update an item in a 2D list to a new value. Replace 2D List
    • Matching Python command:Replace 2D List Python
  • Use a nested loop, a repeat block within another repeat block, to record the color of each pixel in each column. Nested Loop
    • Matching Python command:Nested Loop Python