Skip to main content

Castle Crasher
Lesson 4: Creating Algorithms

Practice

In the last section, you learned how the Optical Sensor works and how you can use data from the sensor in your code to have your robot make decisions. Now, you are going to apply what you have learned to create an algorithm and complete the Robot Sweep practice activity.

In this activity, your robot will autonomously drive and push two Buckyballs off of a raised Field. Watch the video below to see how you can apply what you have learned to complete the Robot Sweep practice activity.

Now it's your turn to complete the Robot Sweep practice activity!

In this animation, the robot autonomously drives to push two Buckyballs off of the Field. Watch this animation to see one possible path your robot could take to complete the Robot Sweep practice activity.

Follow the steps in this document to complete this activity.

As you complete the Robot Sweep practice activity, document your findings in your engineering notebook.

  • Before beginning, plan the behaviors you want your robot to complete. Think about how these steps relate to the code you want to create. 
  • As your run your project, take notes on how the robot is moving.
  • Make a list of ideas for improvements to make to your code and to your robot's build.

View this image for an example of how you can record your results.

Image
Eng Notebook - Castle Crashers - Lesson 4

Prepare for the Challenge

In Compete (on the next page), you will code your robot to autonomously find and remove four Buckyballs from a raised Field. Look at the document and animation below to learn how to compete in the Sweep the Field challenge. Then complete the Check Your Understanding Questions and practice for the challenge.

The goal of this challenge is to have your robot autonomously drive to find and remove four Buckyballs from a raised Field in the fastest time. 

Watch this animation to see an example of how your robot could move in a successful run of the challenge.

This is just one possible path your robot could take to complete the Sweep the Field challenge activity.

Follow the steps in this document to learn more about how to complete this activity.

Check Your Understanding

Before beginning the challenge, ensure that you understand the rules and setup of the challenge by answering the questions in the document below in your engineering notebook.

Check Your Understanding questions >

After completing the questions, try practicing the challenge.


Select Next > to compete in the Sweep the Field challenge.