Ozobot Classroom

Lesson Creator

  • Preparation
  • Direct Instruction
  • Student Practice
  • Supplements
  • Review

1. Tell Us About Your Lesson

All fields are required unless marked as optional

A. Lesson Overview


Students will

  • Hockey Simulator Level 1 https://classroom.ozobot.com/lessons/lnhWqIcBmsSXWN6Xf6lGsieQRr

    REMOVE ✖

B. Lesson Details

Lesson Duration (minutes)The time (minutes) to complete the whole lesson.

Grade LevelsSelect all that apply


Subjects/TopicsChoose the most relevant subject(s). Select up to 3.


    Coding Styles


    Product Lessons


    Tested With

    2. Preparation

    This helps the teacher prepare for the lesson before the class session

    A. Student Materials

    B. Background Knowledge (Optional)

    C. Lesson Tips (Optional)

    Add tips for the educator that don't fit into Direct Instruction or Student Practice. You can always return to this page to add more.

    3. Direct Instruction (Teacher-Facing Instructions)

    These are the steps the educator will read. Include any front loading, modeling or explicit instruction before students work independently or in groups.

    Instruction

    Introduction

    Students teach Ozobot to handle a puck using proximity sensors, then all groups test their understanding by creating an Ozobot relay race.

    By combining inputs from sensors with logical operators (and, or) and logical statements (if, else), you can achieve some realistic behaviors in your robot. Even with the few code blocks used in this lesson, you can create some cool behaviors.

    Level 2 begins with students discovering or recalling that Ozobot can be moved using its proximity sensors, in this case, using a paper puck. Students play with a simple program made of if statements and Boolean operators (and, or), then iterate small adjustments to help complete a class-wide relay.

    Instruction

    Discover Logic and Sensors

    Hand out the Level 2 Spec to each student. Each group will explore how to make Ozobot move using its proximity sensors and discover how programming the sensors with if statements creates this behavior.

    Share the Ozobot Blockly program found at: https://ozo.bot/b/vm7ubr or use Share Code vm7ubr

    Run the program. Place your hand in front of Ozobot to activate the front proximity sensor. Ozobot should move forward. If you place your hand behind Ozobot, it should turn until it detects an object to follow. Students run the program and complete the table on the Spec.

    Instruction

    Discussion Questions

    CONDITIONAL LOGIC WITH IF/ELSE

    What is Logic and what does Conditional Logic mean? Logic is determining if something is true based on evidence. Conditional logic is checking if a condition is true or false. In programming, think of it as checking on the 'truthiness' or 'falseness' of an if statement. You can read an if statement as, "Is surface color equal to blue true? If it is true, run the code. If it is false, skip the code.

    What is the difference between if and else if? If is always the first check, and else if is every other check. They all need a specific condition to check for truthiness. They cannot be blank.

    What is else? Else means that if all if conditions are false, do this code. If you never program else, then the computer understands that it should do nothing, which is often useful.

    BOOLEAN OPERATORS

    Why would you use AND? Why would you use OR? AND is when you want two conditions to happen at the same time. OR is when you don't care which condition is true, and they both could be.

    Describe the difference: "if front left sensor AND front right sensor' vs 'if front left sensor OR front right sensor'. The first conditional check means they both must be true for the code to run. The second one means either one can be true and the code will run.

    INFRARED SENSORS

    How do these sensors detect distance? Ozobot sends out invisible infrared light from each sensor array and also looks for infrared light in that array. Ozobot knows something is close when it gets a lot of infrared rays bouncing back and the object is far when there are only a few rays returning.

    Do a quick experiment with the proximity sensors using this program: https://ozo.bot/b/z6afwv. Run the program and then starting from about 8 inches away, move your hand (or another object) slowly closer to the left front proximity sensor. Ozobot's LEDs should change color. Adjust the settings in the program and hypothesize about how Ozobot will react.

    Instruction

    Build the Puck

    Cut out the papercraft puck and fold it according to the instructions on the page. Use tape to hold it together.

    Instruction

    Puck Handling

    Possible Solution: https://ozo.bot/b/cd3hb2 or use Share Code cd3hb2

    Students will build a puck-handling program based on the Spec created. Following are some suggested questions.

    What actions does Ozobot need to perform? Move forward, turn toward the puck, if there is no object don't move, or move forward until an object is detected.

    How can these things be written in pseudocode? Remind students that pseudocode is everyday language that sounds like code but isn't necessarily the same wording as the program. 1) if right front AND left front sensors are activated, set wheel speeds 45/45 for 0.1 seconds. 2) Else, if right front sensor is activated, rotate -30º at 45 mm/s. 3) Else, if left front sensor is activated, rotate 30º at 45 mm/s. 4) Else, do nothing.

    Does it matter which if condition check happens first? Yes, If it is not in the order above, then Ozobot will turn when it sees something before walking forward when it sees something. Prioritize the way the sensors tell Ozobot to move.

    Make adjustments to the program as needed to make it work the way students want.

    Instruction

    Mission - Teach Ozobot to Relay Race

    Possible solution: https://ozo.bot/b/ugggi3 or use Share Code ugggi3

    Provide the following outline:

    1. Ozobot will push the puck forward until a certain time or place.
    2. Ozobot should turn off or at least end the program.
    3. The second Ozobot will see the puck and push it forward without detecting the first Ozobot.
    4. The last Ozobot should turn off or end the program at the finish line.

    Brainstorm ways to program Ozobots to perform these actions. Each group writes their program idea on the Spec as pseudocode, then, program and test with another group or two groups.

    Encourage students by letting them know that even seasoned programmers write code and test repeatedly to make sure the program works as intended.

    Solution notes:

    1. Use lights at the beginning of the program so you know Ozobot is running the program.
    2. Ozobot moves forward when its front sensors are activated until it lands on blue.
    3. Ozobot terminates the program on blue (its lights will turn off)
    4. The second Ozobot is positioned so that the puck is in front of it when the last Ozobot turns off on blue. (Bots are at right angles to each other.)
    5. The second Ozobot pushes the puck to the next blue section to either pass it or win.
    6. Note that the position and distance of the bots and the angle of the puck matter. Find out what works best by trial and error.

    Instruction

    Lesson Wrap-Up

    Review the questions from Step 3 above. Then discuss the following:

    1. What did you learn from the program that demonstrated the proximity sensors with different LED colors?
    2. What are some situations where you could use that program again?
    3. Can you name some applications of the relay program that could be used in manufacturing or industry?

    4. Student Practice (Student-Facing Instructions)

    These are step-by-step instructions delivered directly to the students as they work independently or in groups

    Student Instructions

    Instruction

    Discover Logic and Sensors

    On the Level 2 Spec, explore how to make Ozobot move using its proximity sensors, and discover how programming the sensors with if statements creates this behavior.

    Share the Ozobot Blockly program found at: https://ozo.bot/b/vm7ubr or use Share Code vm7ubr

    Run the program. Place your hand in front of Ozobot to activate the front proximity sensor. Ozobot should move forward. If you place your hand behind Ozobot, it should turn until it detects an object to follow. Run the program and complete the table on the Spec.

    Please upload any student resources, videos, etc. (Max. size: 512 MB videos, 10 MB all other files)

    Goal

    Instruction

    Discussion Questions

    In your group or as a class discuss the following questions:

    CONDITIONAL LOGIC WITH IF/ELSE

    What is Logic and what does Conditional Logic mean?

    What is the difference between if and else if?

    What is else?

    BOOLEAN OPERATORS

    Why would you use AND? Why would you use OR?

    INFRARED SENSORS

    How do these sensors detect distance? .

    Do a quick experiment with the proximity sensors using this program: https://ozo.bot/b/z6afwv. Run the program and then starting from about 8 inches away, move your hand (or another object) slowly closer to the left front proximity sensor. Ozobot's LEDs should change color. Adjust the settings in the program and hypothesize about how Ozobot will react.

    Please upload any student resources, videos, etc. (Max. size: 512 MB videos, 10 MB all other files)

    Goal

    Instruction

    Build the Puck

    Cut out the papercraft puck and fold it according to the instructions on the page. Use tape to hold it together.

    Please upload any student resources, videos, etc. (Max. size: 512 MB videos, 10 MB all other files)

    Goal

    Instruction

    Puck Handling

    Build a puck-handling program based on the Spec you created. Following are some suggested questions.

    What actions does Ozobot need to perform?

    How can these things be written in pseudocode? Remember that pseudocode is everyday language that sounds like code but isn't necessarily the same wording as the program.

    Does it matter which if condition check happens first?

    Make adjustments to the program as needed to make it work the way you want.

    Please upload any student resources, videos, etc. (Max. size: 512 MB videos, 10 MB all other files)

    Goal

    Instruction

    Mission - Teach Ozobot to Relay Race

    Use the following outline:

    1. Ozobot will push the puck forward until a certain time or place.
    2. Ozobot should turn off or at least end the program.
    3. The second Ozobot will see the puck and push it forward without detecting the first Ozobot.
    4. The last Ozobot should turn off or end the program at the finish line.

    Brainstorm ways to program Ozobots to perform these actions. Each group writes their program idea on the Spec as pseudocode, then, program and test with another group or two groups. Remember even seasoned programmers write code and test repeatedly to make sure the program works as intended.

    Solution notes:

    1. Use lights at the beginning of the program so you know Ozobot is running the program.
    2. Ozobot moves forward when its front sensors are activated until it lands on blue.
    3. Ozobot terminates the program on blue (its lights will turn off)
    4. The second Ozobot is positioned so that the puck is in front of it when the last Ozobot turns off on blue. (Bots are at right angles to each other.)
    5. The second Ozobot pushes the puck to the next blue section to either pass it or win.
    6. Note that the position and distance of the bots and the angle of the puck matter. Find out what works best by trial and error.

    Please upload any student resources, videos, etc. (Max. size: 512 MB videos, 10 MB all other files)

    Goal

    Instruction

    Lesson Wrap-Up

    Review the questions from the beginning of the lesson. Then discuss the following:

    1. What did you learn from the program that demonstrated the proximity sensors with different LED colors?
    2. What are some situations where you could use that program again?
    3. Can you name some applications of the relay program that could be used in manufacturing or industry?

    Please upload any student resources, videos, etc. (Max. size: 512 MB videos, 10 MB all other files)

    Goal

    Lesson Extension (Optional)

    Add student instructions for a lesson extension.

    Instruction

    Please upload any student resources, videos, etc. (Max. size: 512 MB videos, 10 MB all other files)

    Goal

    5. Supplements

    A. Lesson Closure (Optional)
    Give tips for how to wrap up the lesson and assess student learning. (Want to add an attachment? Use Part C, below.)

    B. Academic Standards (At least one standard required)
    Choose a category from the dropdown on the left. In the blank on the right, begin typing the number of the standard.

      csta-2-ap-12 csta-2-ap-15 csta-2-cs-02 csta-2-da-08

      C. Add Other Attachments (Optional)
      Please upload any student handouts, videos, sample solutions, etc. (Max. size: 1 GB videos, 10 MB all other files)

      Add Cover Image

      Review

      Please review your lesson before submitting.

      Save Draft

      Please login or create an account to access this content and more!

      Login / Create account