ModulesRobo LiveRobo CodeRobo Blockly

Line Follower

In this tutorial you will learn how to use the Line Follower in your build and different Robo Apps and then create your first project with this sensor.

1. Line Follower Key Info
2. Line Follower in the build
3. Robo Live App
4. Robo Code App
5. Robo Blockly App
6. Let’s do a Line Follower project together!

To complete this tutorial you will need:

Line Follower Key Info

  • It’s a sensor;
  • It uses 3 IR emitters & receivers that send and receive signals back in order to detect a line, an object or an edge in front of it;
  • To detect a line: use a white background and black lines 7-15 mm width;
  • The sensor can also detect an object in front of it or edges of a table.

Line Follower in the Build

There are different ways to attach the Line Follower to your build accordingly to its function.

If you want your robot to follow a line or detect an edge, build a robot with the Line Follower facing the surface:

  • Attach the Line Follower to the front of the build with the direction mark facing down towards the surface and forward;
  • 3 emitters & receivers should be very close to the surface;
  • Attach 2 Smart Motors symmetrical to the Line Follower but not on the same line;
  • Add a Small Wheel to balance the build.

If you want your robot to detect the object in the front, build a robot with the Line Follower facing forward:

Robo Live App

In the Robo Live App the Line Follower Control shows the state of each of the 3 sensors (emitters & receivers). You can use it in your Robo Live projects for detecting the edges or objects.

Robo Code App

In the Robo Code App there is Line Follower Action and Line Follower Trigger that can be used in your code.

The Line Follower Action

The Line Follower Action is in the Move Action Category and will make your Robo follow the line driving both Smart Motors automatically:

  • Tap on the Line Follower Action to see some specifications and adjust settings;
  • Change the Motors’ speed if you want your Robo to move slower or faster;
  • Tap on the Gear icon to check if your Motors are in the right position; you can tap and try them separately or just simply use the Reverse Button to change the direction for both Motors.
Program the Line Follower Trigger

Program the Line Follower Trigger to regulate a Transition between two Actions. The Trigger will react to a line or an object in front of the Line Follower. Tap on the Line Follower Trigger to change the settings.

  • You can set the Trigger to occur when a line or an object is detected or when it stops being detected;
  • The red dot above one of the icons shows you the current position of the sensor to a line or an object.

Robo Blockly App

In the Robo Blockly App there are two different types of Code Blocks related to the Line Follower: Line Follower Code Block and Line Follower Input.

Line Follower Code Block

Line Follower Code Block  will make your Robo follow the line driving both Smart Motors automatically. You can adjust different settings such as Motors’ speed or positions of the Motors.

Line Follower Input

Line Follower Input can be placed in different Flow, Operators, Function or Variables Code Blocks and will give an input from the Line Follower emitters & receivers. You can set the input status: obstacle detected or no obstacle detected.

Let’s do a Line Follower project together!

Let’s teach our Robo some geometrical figures. Do you know them all yourself?!

Build Robo

Build your Robo this way, so it can follow a line.

Get the tools

Prepare a big white paper and a black marker.

Draw

Draw your favourite geometric shape on the paper using the black marker: the line should be 7-15 mm width; we will draw a triangle.

Code your robo

Open the Robo Code App and code the Line Follower Action; check the position of the Motors and change the speed to 70, so our Robo can learn the geometric shape slowly.

Start your code

Press the Start Button to try out your code and watch how Robo follows the line and learns your favourite geometric shape.

Play!

Now your Robo can follow your favourite geometric shape! Which one will be the next? Learn about different geometric shapes: Square, Oval, Rhombus or Hexagon!