Introduction
In this Lesson, you will learn about the Optical Sensor, and how you can use sensor feedback to optimize your strategy and your code for playing Castle Crasher. You will also learn how to create an algorithm to code your robot to autonomously find cubes and complete the Sweep the Field Challenge. Watch the animation below to see an example of how the robot could move to detect and clear cubes from the Field without falling off the edge.
The Field is setup with the BaseBot in the center and four cubes placed randomly around it. The BaseBot moves to detect the first cube, and pushes it off the Field. It moves to detect the next cube. The animation then shows the end of the timed trial as the fourth cube is detected and pushed off the Field.
Select Next > to learn about the Optical Sensor and how you can use sensor feedback and algorithms to code your robot to find and push cubes off a field.