Storm the Castle is one of the challenges on the VEX VR website that had to be completed for my STEM class. The goal of the challenge is to knock down the four towers around the castle without falling off the playground.
The first step to completing this challenge was to make sure the robot would not fall off. The playground is marked with a red line around its perimeter. This line will be detected by the color sensor. Then, I have to create a loop in which every one of the four objects will be knocked down.
Inside the loop, the robot will turn right until it senses an object. It then drives until it sees the red line, leading it to drive another 100mm. It then backs away for approximately 250mm, and then turns 45 degrees to the left. This is done to make sure that it can detect all the blocks on its left as well. The loop is then repeated four times.


