Materials required
- Using the ultrasonic sensor slides
- Otto Starter robot or only the circuit board with the ultrasonic sensor
- Computers with internet and/or bluetooth connection
Learning Objectives
- Identify the key components of a robot and explain their functions.
- Recognize robotic systems in everyday life and be able to reason about how they help.
- Write and upload programs that control the robot.
- Modify an existing program to add new functionality to the robot.
- Identify the problem to be solved and develop a plan to address it using the Otto robot components.
- Work effectively in a small group to design, build and/or code a robot.
- Create a project that combines robotics with another creative discipline.
How can Otto see stuff?
Start the activity by asking students to share their ideas about how Otto can use its “eyes” to actually see stuff. If students already know the name of the sensor, another good question can be “how do you think that ultrasonics work?”
Encourage students to share any idea they could think about!
In the second slide, it briefly specifies that Otto can effectively “see” stuff, but not exactly in the same way that we, humans, do.
The next slide provides a concise explanation of how the ultrasonic sensor operates. As a teacher, you have the freedom to expand upon this explanation using your own resources.
Activity: coding the ultrasonic sensor
In case that students still don’t know it, in this activity they will discover that the ultrasonic sensor, besides measuring distances, can also display lights. Going to webcode, allow students to connect their Ottos and make the code in the slide to try out how the sensor works by displaying green lights when the sensor detects something in less than 20 cm, and keeping lights off when it is nothing in less than that distance.
10-1_test-ultrasonic-light-measure.otto
Once each student has tried the code and verified its functionality, the teacher can ask them to explain why the code works. This exercise encourages students to understand the logic behind the code and reinforces their comprehension of how the components interact to achieve the desired outcome.

Setting the color of each “eye” to black

Using the lights off block
Confirming that the sensor work
Challenge: Zones Lights
In the last slide, we introduce a small challenge for students called “Zones Lights”. By measuring distance with the ultrasonic sensor, Otto must determine if an object is in a safe, warning or dangerous zone. The closer the object is, the more dangerous the area.
There is a small intentional “mistake” in the challenge definition to expand the activity.
The definition of the challenge propose to code the robot for the next distances:
when the distance is equal or greater than 80 cm
when it is less than 50 cm
when it is less than 20 cm
Here are two possible solutions for the challenge:
This one implements if + else if blocks 10-2_zone-lights-1.otto
This one works with multiple if statements instead
10-2_zone-lights-2.otto
If we look carefully, there is a gap between 50 and 80 cm. In the code, we didn’t explicitly tell the robot what it should do when an object is between 50 and 80 cm, so… what will the robot do?
Another solution that could be proposed is this one: 10-2_zone-lights-3.otto
The difference between this one and the two previous ones is that here we are covering the 50 to 80 cm gap by triggering the else block and displaying the red color. Since it is an else block, it will be activated under any condition that is not defined above.
Depending on how the students made the code, their robots could handle this gap in different ways, in most of the cases it will keep the previous color it has shown (yellow or green).
Activity expansion
This last activity could be expanded by adding extra challenges to students like:
Debate about the question: what will the robot do when the distance is between 50 and 80 cm? and allow students to propose ideas to handle that gap.
- Add more components to the code. If students already know how to use the other components of the robot (buzzer, color lights, motors) they could also add them to this code.
Lorem ipsum
The duration of this lesson is approximately one hour. You can find the definition of learning objectives at the bottom of this guide to align with your curriculum requirements.
Materials required
- Lesson slides
- Lesson worksheets
- TV, projector, or big screen to display the class videos
- Big paper or cardboard (white)
- Tape (black)
- Scissors
Computers, tablets or smartphones are optional, they can be used as digital tools for students to do further research and take additional notes.
Connect
The class begins by displaying the first slide and asking the students “What do you see here?’“
[Pause and wait for students to provide answers, which may include mentions of a robot arm and two wheeled robots moving boxes].
The teacher will then guide the class in a conversation about the nature of robots, exploring questions such as: ‘What is a robot?’ ‘When does something turn into a robot and when is it just a machine?’
Moving on to the second slide, the teacher will introduce the topic of the usefulness of robots to humans. Students should share their ideas about how robots can be useful.
[This conversation is expected to last approximately 4-5 minutes]
Afterwards, on the third slide, the students will watch a video that explains the concept of what a robot is. Following the video, they will have the opportunity to share their personal experiences with robots. The teacher can guide the conversation by asking specific questions, such as: ‘Have you ever played with a robot or built one?’ ‘Do you have any robotic devices at home, like a vacuum cleaner, that you consider to be a robot?’
[The video has a duration of 4 minutes, and the discussion about personal experiences is expected to take an additional 3-5 minutes]
On the next slide, the teacher will organize small groups consisting of 2-3 students. Each group will be assigned a specific robot to investigate. The students can conduct their investigation by using the internet or through provided materials, either digital or physical. Some popular real-life robots for the students to explore are:
As a teacher, feel free to research other robots to add to the list. By the time you teach this lesson, there could be some new and popular robots.
During this activity, students will gather information about their assigned robot and gain knowledge about how robots are being utilized in daily life. At the end of the investigation, each group will give a brief presentation about the robot they investigated.
Here the students will use the first worksheet
[This activity is expected to take approximately 10-15 minutes in total, allowing sufficient time for research and presentations]
Make
On the fifth slide, the teacher will introduce the HP Otto robot by showing a video about its features and capabilities. After watching the video, the teacher will demonstrate a built robot to the students, showcasing its physical components and explaining how they contribute to its functionality.
[To further engage the students, the teacher can connect the robot to the Otto web control app, demonstrating how to operate and control the robot using the app’s interface.]
On the next slide, a diagram displaying the internal connections of the robot will be shown. Using the web control app, the teacher will demonstrate how each component of the robot works.
To engage the students, the teacher can actively involve them in the activity. For example:
- Buzzer: The teacher can play various sounds available on the app and ask students to suggest or choose which sound they would like to hear.
- LED ring: The teacher can ask students (up to a maximum of 12) about their favorite colors and display them on the LED ring.
- Ultrasonic sensor: The teacher can activate the avoidance function and make the robot move around the classroom. Students can participate by intercepting the robot’s path with their hands, observing how the robot changes its direction in response.
- Line sensors: Although the line tracking activity will be conducted later, the teacher can explain how the infrared sensors work at this stage.
In the next activity, the entire group will work together to define a racing track circuit for the robot to navigate. The teacher will guide the students in this process, but it is important to allow the students to make the decisions in order to foster their creativity and engagement. The goal is to define a circuit that includes specific landmarks or areas within the classroom for the robot to move around.
For example, the students may decide to start the circuit in front of the teacher’s desk, then describe a square around James’ seat, move in a zigzag pattern between Eva and Raidy’s seats, and finally return to the teacher’s desk. [To maintain efficiency, the teacher should encourage the students to make quick decisions, aiming to complete the circuit definition within 1-2 minutes]
[Optional]: As an additional challenge, the teacher can allow students to take turns controlling the robot and measure their individual completion times. This can add an element of friendly competition among the students.
The next activity is similar to the previous one, but this time the students will create a line track using ‘tape’ on a large white piece of paper or cardboard.
Lorem ipsum
Lorem ipsum
