Line follower

Students will learn how to turn Otto into a line follower robot capable of navigating around a line follow map.

Knowledge required

This activity assumes that students already know at least how to code motors and line sensors components. Also, to get the most out of the activity, it would be best ifalso knew how to write algorithms.

Materials required

  • Line follower slides 
  • Otto Starter robot 
  • Computers with internet and/or Bluetooth connection 

Optional materials

  • White paper and black tape to make customized line tracks  
  • Line sensor not assembled to the robot to easier demonstration of calibration 
  • Line follower worksheets 

Learning Objectives

  • Identify the key components of a robot and explain their functions.
  • Describe the difference between sensors and actuators and how they interact in a robot.
  • Recognize robotic systems in everyday life and be able to reason about how they help.
  • Know that robots use algorithms to perform tasks.
  • Write and upload programs that control the robot.
  • Modify an existing program to add new functionality to the robot.
  • Understand key concepts of programming (loops, conditionals, variables, and functions) and apply them to write effective programs for the Otto robot. 
  • Identify the problem to be solved and develop a plan to address it using the Otto robot components.
  • Use an iterative design process to improve the robot’s performance. 
  • Communicate ideas and results clearly and professionally to peers and teachers. 
  • Explain how the project demonstrates the potential of integrating technology with the chosen discipline. 

Line follower: Could we code Otto to follow marks on the floor?

Start by asking students if they know what a line follower robot is. Once the group gets the general idea about it, brainstorming ideas about how Otto could perform a line following navigation.

đź’ˇOn slide 2, it makes a reference about writing algorithms to perform the action of following lines. It can be a good first step to get students into the right thinking about how to code their own line follower Otto. Consider taking a time for students to write down in paper the step they consider their Otto should take to correctly follow lines. The next slide could work as a good hint for students to think about how to structure the algorithm.

On slide 4, the teacher will guide students through the process of calibrating their line sensors if necessary. The teacher can start by demonstrating how to calibrate a sensor:

  • Using the kit’s screwdriver, turn the potentiometer in the sensor all the way to the left (counter clockwise rotation).
  • Then, with the robot (or just the sensor) placed on a line follow map, move the sensor back and forth between the dark line and the light surface, observing that the light in the sensor doesn’t respond as expected.
  • Next, gradually turn the potentiometer back to the right (clockwise rotation) until the sensor accurately detects the line. 

When the sensor is properly calibrated, students will notice that the light turns on clearly and consistently over the light surface and turns off when moving over the dark line. This adjustment will allow Otto to follow lines in a stable and precise way. The teacher can invite students to repeat the procedure themselves and compare the results, calibrating their sensors if necessary; thus reinforcing the importance of proper calibration before starting the line-following tests.

Activity: from algorithm to code

Encourage students to implement their algorithm using the word blocks app blocks to make their robots follow lines (for this activity, use the line follow maps included with every kit. It is possible to use any of them). In the activity slide, there are block suggestions for students to include in their code.  

It is possible that the algorithm students wrote to make the line follower might not be effective, at this point encourage students to detect where the algorithm is failing and to correct it until get the best result possible. 

In the Word Blocks examples section, you can find a basic code to make Otto follow lines in the project called “Follow black line”:

This example uses line sensors connected in an analog way, with predefined values of 800 to determine the change between a light surface and a dark line, as shown in this part of the example code. Depending on the environment, it may be necessary for your Otto or the students’ robots to adjust this value and find one that works best. 

Consider introducing a fun challenge to motivate students to improve their codes, such as:  

  • Finding the faster Otto: Code your Otto to complete 3 laps around the map [assign the same map to everyone] in the minimum time possible 
  • Finding the most stable but faster Otto: Code your Otto to complete 3 laps around the map [assign the same map to everyone] in the minimum time possible while the robot keeps an [assign an object] in the head. 

Activity expansion: customized line follower maps

To extend the line-following activity, the teacher can organize students into teams and have them investigate different methods for building maps. For example, some groups may try using paper and black tape, while others experiment by drawing the lines directly on paper with markers. The goal is not only to create the maps, but also to test whether the robot can follow them successfully, analyze the differences between methods, and draw conclusions about why each one works or doesn’t. As a final step, each team can prepare a short report comparing their results and reflecting on which method is more practical or accurate in different situations. 

Lesson Evaluation

  • Students can calibrate line sensors when needed. 
  • Students can implement their algorithms using the word blocks app blocks to create a line follower Otto. 
  • Students identified and corrected algorithm flaws to improve line following performance. 
  • Students understand real-world applications of line follower robots and how these skills can be applied beyond the classroom. 

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

Scroll to Top
Thank you for your interest in our robot Otto.
Let us inform you that the Otto Starter Kit will be ready for purchase at the end of January 2024.

If you would like to pre-order Otto Starter kit, feel free to contact us at email address moravia@moravia-consulting.com.
This will be available with the release of this product.