Lec WB5
Lec WB5
Name:
Section:
NAGASAKK
Date:
MM DD YYYY
10 / 04 / 2023
Explain in paragraph form how this line follower robot car operate through ···/5
data processing (input-process-output).
Line following Robot is a machine that can follow a path.The path can be visible like a black
line on a white surface or it can be invisible like a magnetic field. Sensing a line and
maneuvering the robot to stay on track,while constantly correcting wrong moves using
feedback mechanism forms a simple yet effective closed loop system. The line follower
robot is a simple robot that is based on automation that follows a specific direction based
on a particular line, usually a dark line on a light surface. The robot consists of two sensors
that are installed at the front end of the robot body and two wheels that are driven by DC
motors. The circuit board present in the robot controls the wheel speed based on the input
signal from the sensors. The controlling of the robot is done like that when the robot sees a
black line it stops.
Elaborate also how this robot car turn left, turn run, move forward and stop ···/5
in reference to the black strip.
By using two IR sensor modules namely left sensor and right sensor.
* When both left and right sensor senses white then robot move forward.
* If left sensor comes on black line then robot turn left side.
* If right sensor sense black line then robot turn right side until both sensor comes at white
surface. When white surface comes robot starts moving on forward again.
* If both sensors comes on black line, robot stops.
Create a simple pseudocode on how the line follower robot decide when to ···/5
turn left, turn right, move forward and stop. (5 points)
int am 6,bs 7;
void setup()
(
pin Mode(a,INPUT);
pinMode(2,OUTPUT);
pinMode(3,OUTPUT);
pinMode(b,INPUT);
pinMode(4,OUTPUT);
pin Mode(5,OUTPUT);
Serial.begin(9600);
}
void loop()
}
if(digitalRead(a)==HIGH)&&(digitalRead(b)==HIGH))
}
digitalWrite(2,HIGH);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,HIGH);
Serial, print in("FORWARD");delay(1);
}
else if((digitalRead(a)==LOW)&&(digitaIRead(b)==HIGH))
}
digitalWrite(2,LOW);
digitalWrite(3,HIGH);
digitalWrite(4,LOW);
digitalWrite (5,HIGH);
Serial.printin("LEFT”);delay(1);
}
else if(digitalRead(a)==HIGH)&&(digitalRead(b)==LOW))
{
digitalWrite(2,HIGH);
digitalWrite(3,LOW);
digitalWrite(4, HIGH);
digitalWrite(5,LOW);
Serial.printin("RIGHT");delay(1);
}
else if((digitalRead(a)==LOW)&&(digitalRead(b)==LOW))
digitalWrite(2,HIGH);
digitalWrite(3,LOW);
digitalWrite (4,LOW);
digitalWrite (5,HIGH);
Serial.printin("BACK"):delay(1);
}
This form was created inside of Maritime Academy of Asia and the Paciec.
Forms