GETTING STARTED
ROBOTICS
TAKING LEARNING TO THE REAL WORLD
CAPSTONE PROJECT

ACTIVITY: Simplified Line Following Robot

Simplified Line Following Robot – Overview

You’ll agree with us when we say that making the script for our line following robot was tiresome; adding soooo many blocks, checking each motor individually every time, and whatnot.

But we have some good news! PictoBlox has some special blocks dedicated to make a line following robot that will replace ALL the blocks we used in the previous script. Let’s have a look at them!

Let’s Code!

  1. Add a green flag block in the scripting area and two set () IR sensor threshold to () blocks and set the threshold of left and right IR sensor.
  2. Go to the Robot palette and drag and drop a set parameter F (), T1 (), T2 () block.

    Set the parameters that you have finalized in the last topic.

  3. Add a forever block below the set parameter F (), T1 (), T2 () block.
  4. Now, from the Robot palette, add a do line following block inside the forever block. This block will take care of ALL the line following conditions that we had to check individually in our previous script.
  5. Next, add a stop robot block inside the do line following block.

Enjoy for REAL now!

What happens at the checkpoints?

As you would have noticed, the robot detects the checkpoints in the line follower block, we can do whatever we want at that checkpoint. Like in the previous code we made the robot stop on the checkpoint. 

You can make the robot go forward as well to have it moving in the track without interruption like this: 

We will use this checkpoint in many different ways in the coming lessons!

Assignment

Before you move on to the next lesson, a small assignment awaits you!

Make a video of the project you made in this activity and upload it to the website.

Submitting the assignment is a must in order to receive the certificate after completing the course.

Follow the steps below to upload your assignment:

  1. First, you need to choose the video file, thus click on Browse.
  2. Select your video file.
  3. And click the Upload button.

Good luck!

×
×

Cart