Lego Sensor — LineFollower

Line Follower Tribot v1.0— Episode #07

J3
KidsTronics
4 min readApr 19, 2019

--

The Tribot uses the Color Sensor in Reflected Light Intensity mode to follow the edge of the line by adjusting the steering based on the light Sensor reading.

More videos? click here now!

How does it work?

Sensor reading tells you how much light is reflected from a small circular area under the sensor.

The basic program — between two extremes:

When the sensor is over the white background, it will give a high reading (72) because a large amount of light is reflected;

Whereas completely over the black line, the reading will be low (8) because a small amount of light is reflected.

Let’s read Color Sensor in different positions. How about 5 positions?

Fig 1. Color Sensor reading at different positions

Here are my readings:

Fig 2. Look at Port View for Color Sensor; The readings: Completely off the line: 72, Slightly over the line: 59, Over the edge of the line: 14, Mostly over the line: 8 and Completely over the line: 9
Fig 3. Color Sensor reading at different positions as shown in Episode#07; the less light reflection, the lower the sensor’s value.

The Codes:

Fig 4. Code I — 07_a_LineFollower.ev3 (Download from my Google Drive)
Fig 5. Code I — 07_b_LineFollower.ev3 (Download from my Google Drive)
Fig 6. Code I — 07_c_LineFollower.ev3 (Download from my Google Drive)

That’s it!

You can download all the codes in my google driver repository.
We are getting used to the lego and from now on we can impress our friends and family ;)

Download All files For This Episode

Related Posts:

01º Lego Episode — Our Startup’s Journey — Invaders and Invasions?

02º Lego Episode — Timmyton Lego-Learning-By-Playing — L2BP Series

04º Lego Episode — Lego MotionsTribot v 1.0Seeing Your Creation Move — Move Steering Block

05º Lego Episode — Lego Motions Move Tribot Around — And Backward…Five Programs Files

06º Lego Episode — Lego SensorsTouch N Color — Two out of five human senses — Touch N Sight

07º Lego Episode — Lego Sensor LineFollower — Line Follower Tribot v1.0

08º Lego Episode — Maze Solving Robot v1 — Lego Solution Right-Wall-Follower-Robot

09° Lego Episode — Gettle_&_Sound_Bots — How gentle can a robot be? What is the audible range of the human ear? How deep can we dive?

10° Lego Episode — Data Logging — Data Collection and the EV3

11º Lego Episode — Binning the LineFollower Code — Binning: Arithmetic To Map Sensor Reading

8th — kidSerie J3 Follower Line Robot v1.0 — The Simplest Follower Line Robot

12º Lego Episode — A Proportional LineFollower Robot — Advanced Math To Improve Your Robot’s Steering

13º LEGO Theory — Theory of Multitasking — A very Useful Programming Technique

14º LEGO formula — Normalizing Data — Converting Data to Use The Same Range

15º Lego Episode — PID — The Ultimate Line Follower — Algorithm for your EV3 PID Line Follower Robot

16° Lego Meets Pixy Episode — How to Connect Your Inexpensive Camera Module to Lego

18° Lego Episode — GEARS & WORMS — Geartrains & Worm & Clutch Gears

23° Lego Episode — Differential Explained — How Differential Works?

24° Lego Episode — PitBot — A Star Is Born — Working at The First Structure in Our Sparring Robot

25° Lego Episode — PitBot Is Agressive? Well, No Worries! — Making PitBot bite!

26° Lego Episode — Dancing Good w/ PitBot — All The Secret for Replicate This Awesome Robot

27 ° LEGO Episode — Sumo Arena is Ready! — Here is the playing arena for Arduino x Lego

28 ° LEGO Episode — Pick Pitbot Up! — Our Robot Are Leaving Body & Paint Shop

28 ° LEGO — B — Episode — Pitbot Battery & Sensor Setup — Preparing The infrastructure for running Arduino code

29 ° LEGO Episode — Bridging All Sensors Together — Pitbot — Collecting All Codes for the Final Act of Giving Behaviors to Robot

Credits & References

Book: The Art of Lego Mindstorms EV3 Programming by Terry Griffin

NXT® motor internals

EV3 Large and NXT Motors — The Differences Explained

Building Instructions & Program Descriptions

LEGO® 9V Technic Motors compared characteristics

Robotics for Children (& Parents (& Grandparents))

Tribot v 1.0 .pdf File

Introducing LEGO Digital Designer

Lego Mindstorm Intensive

Fig 7. Gouache ink, Masking tape, scissors, brush, and graphite pencil and used Paper Recycling conserves wood and other forest resources :)
Fig 8. Painting and inspired by Terry Griffin Book’s The Art of LEGO MINDSTORMS EV3 PROGRAMMING

--

--

J3
KidsTronics

Hi, Guys o/ I am J3! I am just a hobby-dev, playing around with Python, Django, Ruby, Rails, Lego, Arduino, Raspy, PIC, AI… Welcome! Join us!