Materials required
- Lesson slides
- Otto Starter robots
- Tilt sensor from Sense Expansion
- Computers with internet and Bluetooth connection
Optional materials
- Lesson worksheetsÂ
Learning Objectives
- Identify environmental sensors (temperature, humidity, light) and/or interactive sensors (microphone, tilt) and their roles in robotics.
- Explain how sensors enable robots to perceive and respond to their environment or user actions.
- Recognize real-world applications of sensors in robotics (e.g., smart devices, environmental monitoring, assistive technologies).
- Write and upload programs to read data from environmental and/or interactive sensors.
- Use conditional logic to trigger robot behaviors based on sensor thresholds. Create interactive behaviors that respond to sound (microphone) and/or movement (tilt) inputs.
- Debug programs to resolve sensor inaccuracies or unexpected behaviors.
- Refine robot responses through testing and user feedback.
Introduction to Tilt Detection
Encourage students to think about how devices around them detect changes in orientation (slide #3). Ask them to discuss examples they may already be familiar with, like smartphones that switch between vertical and horizontal display modes when rotated. Guide them to consider how these devices might use similar sensors to “sense” position and adjust automatically.
Introduce the concept of tilt detection, focusing on how simple sensors, like binary tilt sensors, detect changes based on a specific threshold. Explain that a binary tilt sensor works by reading “0” when in a stable, upright position and “1” when tilted past a certain angle, triggering a response from the device.
Discussion Prompt: “Can you think of other devices that can tell if they’re being tilted or rotated? How might these devices use sensors like tilt sensors or other components to respond to changes in orientation?”
This activity encourages students to think about how binary sensors fit into a broader ecosystem of orientation detection, sparking curiosity about the role of more advanced sensors like accelerometers and gyroscopes in everyday technology.
Understanding the Tilt Sensor
⚠️Important: the blocks to use the Sense Expansion are not added by default to Word Blocks app, you must add them by:
- Click the configuration icon
- Click the option: 🤖 select Otto kit
- Click the option: Expansion sense
The app will reload and there will be new blocks added to the Sensing section in the software.
Explain how the tilt sensor works (slide #4).
Short explanations
Position change: The tilt sensor detects changes in position. When the sensor is tilted past a certain angle (a threshold), it sends a signal that the robot can detect and respond to, such as moving or activating an alarm.
Our tilt sensor can read digital signals (which switch between 0 and 1 depending on whether it’s tilted or not). It has two lights: one indicates that the sensor is powered on, and the other turns on when the sensor is tilted past a certain angle and turns off when it is not. This second light helps us know the exact point at which the sensor changes its value.
Introduce the tilt sensor block, which returns a “0” or “1” based on the tilt. Guide students to attach and connect the tilt sensor to connector 4 (slide #5). Demonstrate how the sensor works by displaying its value in the serial monitor with a simple program (slide #6):
Activity: Programming a Simple Reaction to Tilt
Encourage them to test their tilt sensors with simple applications that demonstrate the sensor’s functionality (slide #7). Here’s an example:
The robot will move until the tilt sensor detects a change in position. This program can help determine the turning angle at which the sensor changes state.
Allow 5-10 minutes for students to brainstorm their own ideas for testing the sensor, or provide them with this example as a starting point and encourage them to modify it.
Earthquake Detectors?
Since the tilt sensor can detect subtle changes in the robot’s position due to movement, it has the potential to be used as a basic earthquake detector. You can introduce this idea to your students by:
- Asking them to think of any dangerous situations that involve movement. This question could lead to discussions on car crashes and other collisions, which are also interesting scenarios to explore with the sensor.
- Placing the robot on a table, wobbling the table, and asking students if they think this scenario could happen in real life (like an earthquake!). Then, ask if they believe the tilt sensor would be helpful in such a situation.
Activity: Earthquake Detector Alarm
Challenge your students to turn their robots into an “earthquake detector alarm.” (slide #8) Once the robot detects movement that could indicate an earthquake, it should perform alarm-like actions (sounds, lights, and even movements!).
Some ideas for the program:
- The robot could remain stationary, producing alarm sounds and flashing lights to signal a dangerous situation.
- The robot could move around, using sounds and lights to alert everyone “in the building” to the alarm. Finally, it could navigate to an emergency exit to guide people to safety.
Activity: Shaking counter
This program acts as a “shaking counter.” It detects when the sensor tilts from one position and returns, which counts as a “shake.”
Provide this code to students, ideally building it step-by-step with them to ensure a clear understanding of each part.
Once every student has built and tested the code, challenge them to introduce these reactions:
- If the robot detects 5 shakes, it should have a “dizzy” reaction.
- If the “dizzy” reaction occurs 3 times, the robot should appear a bit angry.
If the robot becomes angry twice, it should exhibit an even angrier response, performing exaggerated movements to express its frustration.
Â
Lesson Evaluation
- Students engage in discussions about the binary tilt sensor and share ideas for applications.
- Students successfully program the robot to respond to binary tilt sensor readings with movement, sound, and lights.
- Students experiment with different tilt angles to ensure their code triggers correctly and troubleshoot any issues with conditional responses.
- Students customize the robot’s response with unique lights and sounds, making their robot’s reactions more interactive.
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
