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

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.

    This lesson is part of the Ari Applied AI Career Kit curriculum and is designed to be taught using the kit materials.

    For more information on getting started with Ari, visit https://ozobot.com/pages/ari-resources

    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

    Understanding the AI System (10 minutes)

    Have students turn to Module 2, Lesson 4 in their Field Notebooks and begin on the <a href="https://docs.google.com/document/d/1kD1sVlrot3gr-rwe5XYA31gDBvEZL-eLaukZAT4mec/edit?usp=sharing">Planning & Coding Your AI System_ page. They will use this page to record their work throughout the lesson.

    Today students are simulating how AI systems are programmed to monitor crop health in agriculture. Farmers use AI tools, such as drones with cameras, to scan fields and identify the condition of crops in different locations.

    Explain that these systems do not analyze the entire field all at once. Instead, they focus on one specific area at a time. This is called a region of interest (ROI), which is a defined area the AI is focusing on to collect data. The system divides large fields into smaller sections often using GPS coordinates or grid-based mapping. The AI analyzes each section individually to detect patterns like color changes, dryness, or disease, then records the results for that specific location. This allows farmers to track crop health across an entire field and take targeted action where it’s needed.

    In this lesson, each box on the mat represents a region of interest. The AI system will analyze one box at a time to identify the crop’s condition before moving to the next location.

    Instruction

    Explain the Coding Challenge (10 minutes)

    The Challenge: Create a program that uses the camera and AI to analyze one box at a time, identifying the color of each crop inside. Collect, store, and track each result in a variable to display in the console and with Ari’s lights.

    Overview

    1. This lesson uses section B of the Agriculture Mat.
    2. Show students the green, blue, and red crop cards. Place one crop card in each box.
    3. Model placing the camera above the mat so the AI system can clearly see the three boxes.

    Guide a discussion around how the AI system will work using Input → Processing → Output → Action. Encourage students to define the roles of humans and AI using precise language.

    1. Input: Students create a prompt that updates each time through the program to ask about a different box (Box 1, Box 2, Box 3), and use the camera to capture an image.
    2. Processing: The AI analyzes the image and looks for patterns to identify the crop color.
    3. Output: The AI outputs the crop color (green, blue, or red) for each box.
    4. Action: The program stores each result in a variable, adds it to a list, and uses the output to display results (such as printing to the console and changing light color).

    Instruction

    Group Strategy & Planning (10 minutes)

    Students move into their groups and examine the mat. Ask students to discuss how their AI system should work and talk through possible program structures before coding.

    Discussion prompts:

    • What will your AI system analyze in each box?
    • How will you ask the AI about each box? Will you repeat the same process for each box?
    • Will your prompt change each time the program runs? If yes, how?
    • How will you store each AI output? Where can you display it?

    Students should write their steps in pseudocode or sketch their program flow before coding. Groups should leave this step with a clear plan for how their program will work.

    Instruction

    Setup (5 minutes)

    1. Turn on Ari and open the Computer Science folder. Open the Blockly app.
    2. Place the mat on a flat surface.
    3. Launch the Editor on a coding device.
    4. Connect the camera to the coding device and position it above the mat section.
    5. Open the saved Share Code from the previous lesson.
    6. Under Devices, connect the camera, Ari and LLM bot.
    7. Place a crop card in each of the three boxes.
    8. Check the camera preview to make sure it is aligned correctly.

    Instruction

    Code, Test, Iterate, and Improve (30 minutes)

    Students move to the Ozobot Editor and begin building their program. Each student codes their own version of the solution based on their group discussion.

    • Make sure students open their saved program from the previous lesson using the Share Code. To begin building a new program, have them drag the section of code connected to the Program Start block to the side to disable it.

    Students run their programs on the mat and observe the results. If the system does not behave as expected, students revise their code and test again. Encourage multiple iterations to improve system accuracy.

    • Continue testing the program by swapping out crop card types and changing the placement in the boxes. Run the program again to observe how the list of collected data changes.

    By the end of the lesson, students should have a working version of their AI system that completes the challenge. Students need to save their program and write down the 7-digit share code so they can reopen the same workspace in the next lesson.

    Explanation of Possible Solution

    The steps below outline one possible program that completes the objective. Because coding allows for many valid approaches, students’ programs may look different. Use the breakdown below if you would like to guide students through this example solution.

    Share Code: yu8jtf8

    1. Set the AI system rules. Type in an initial prompt, such as “There are three types of crop cards: red crop cards, blue crop cards, and green crop cards.”
    2. Set up a counter variable. Create a variable titled “boxNumber” and set it to 1. This will track which box is being checked.
    3. Build a dynamic prompt. Create a variable titled “promptText.”
      1. Add a set “promptText” block to a text block. Write in the prompt “What color crop is in box” leaving the sentence open ended.
      2. Add the box number to the text. Connect a “promptText” append text block to a “boxNumber” variable block. This uses the variable counter to finish the sentence with numbers 1, 2, or 3.
      3. Check your work. Print the output to the console so students can see what the AI is being asked. It should say “What color crop is in box 1.”
    4. Use AI to process the image. Use an LLM block with the camera enabled. Ask for a surface color output, which limits responses to: red, blue, green, black. Add the “promptText” variable as the prompt to ask what color crop is in each box.
      1. Store the AI output. Create a variable titled “cropColor.” Set the “cropColor” variable to the LLM response.
      2. Display the output. Print the “cropColor” to the console and use it to change Ari’s light color. Run the program to check your work.
    5. Pause to check your results. Add a wait 5 seconds block to verify the output in the console and Ari’s top light color.
    6. Update the counter. Increase the counter variable “boxNumber” by 1 so the program moves to the next box.
    7. Repeat the process. From the second block, take the section of code and place it inside a repeat loops block set to 3 times. This will run the program three times so each box is analyzed. By the end of the loop, the program has collected and stored data for all three boxes.

    Instruction

    Exit Ticket - Explain Your Thinking (10 minutes)

    Conclude the lesson by presenting the “Explain Your Thinking” question and having students independently complete a written response in their Field Notebook.

    Explain Your Thinking:

    Why does your AI system analyze one region of interest (ROI) at a time instead of the whole field at once? What does this show about how AI systems process data?

    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

    Students will work in the same group of four throughout the module. 

    • Groups will share an Ari, camera, mat, and accessories.
    • Students may share a coding device or work independently on their own devices.
    • Each student will record their work in the corresponding pages of their Field Notebook.

    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-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