Line Follower

In this tutorial you will learn how to use the Line Follower in your build and different Robo Levels and then create your first project with this sensor.
1. Line Follower Key Info2. Line Follower in the build3. Robo Live4. Robo Code5. Robo Blockly6. Let’s do a Line Follower project together!
To complete this tutorial you will need:

1

Line Follower Key Info

2

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:
If you want your robot to detect the object in the front, build a robot with the Line Follower facing forward:

3

Robo Live

In Robo Live 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.

4

Robo Code

In Robo Code 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 Movement Action Category and will make your Robo follow the line driving both Smart Motors automatically:
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.

5

Robo Blockly

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

Line Follower Code Block

Line Follow 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.

Object Detection Code Block

Object Detection Code Block 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.

6

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 large white paper and electrical tape with at least 15mm width (see an example here).

Draw

Draw your favourite geometric shape on the paper using the electrical tape: the line should be at least 15 mm width; we will draw a triangle.

Code your robo

Open Robo Code interface 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!