Basic algorithm to follow a black line

1. Read the robot sensors:

Black reading
White reading
Left sensor reading 40 60
Right sensor reading 30 50

How to calibrate the robot? Reading the sensors

.

.

.

2. Action to take according to the readings:

Algorithm follow black line

.

.

3. Algorithm to follow the black line using 2 sensors:

algorithm

-------------------------------------------------------------------------------------------------

JC - this program follow the black line until see junction (JC)

JC

.

.

.

.

Save a program as a block builder (can reuse the whole program as 1 simple block)

Save the above program as JC (Junction)

block builder

block builder

1. Give the block a name (JC)

2. Write a description of what it does (because you will forget what it means JC)

3. Choose an icon that makes meaning to you.

.

.

blocks

.

.

.

Follow Black line using Maths Algorithm

math algorithm

Last modified: Tuesday, 11 August 2020, 11:05 AM