LOGIN
student of CSE at Rajshahi University
 · RajshahiBangladesh
Share
Report
Get Link
QUESTION
Open

how can I create a line following robot? please give me instructions!!

1 like 
Like
Award Contribution
Community Helper, Finance Guy, Ex-Lawyer
 · New YorkU.S.
Share
Report
Get Link

You should direct your question to the project leaders who started Room Cleaning Robot, and other robotic project leaders.

Like
0 like 
Award Contribution
Student
 · NashikIndia
Share
Report
Get Link

Case 1 is when the robot has to move front as only the center sensor is low. Similarly Case 2 is right, Case 3 is left and case 4 is stop as all the sensors read high. This is how your code should look like (the terms, LEFT_SENSOR, RIGHT_SENSOR, CENTER_SENSOR, GO_FRONT, TURN_RIGHT, TURN_LEFT, STOP are all code macros for the corresponding pin in the microcontroller).

while (1)
{
    if((LEFT_SENSOR==1)&&(CENTER_SENSOR==0)&&
(RIGHT_SENSOR==1))
        LATB |= GO_FRONT; // Case 1
    if ((LEFT_SENSOR==0)&&(CENTER_SENSOR==1)&&(RIGHT_SENSOR==1))
        LATB |= TURN_RIGHT // Case 2
    if ((LEFT_SENSOR==1)&&(CENTER_SENSOR==1)&&(RIGHT_SENSOR==0))
        LATB |= TURN_LEFT // Case 3
    if ((LEFT_SENSOR==1)&&(CENTER_SENSOR==1)&&(RIGHT_SENSOR==1))
        LATB |= STOP; // case 4
}// End of while(1)
Like
2 likes 
Award Contribution
Narendran Ashok
10
Top Contributor
Engineer
 · ChennaiIndia
Share
Report
Get Link

Follow my blog to make a PID line follower. www.storyheros.com

Like
0 like 
Award Contribution
Electronics Engineer
 · Chile
Share
Report
Get Link

Please take a look on my tutorial. Please let me know if I can help you on a more specific doubt.
https://www.hackster.io/mjrovai/line-follower-robot-pid-control-android-setup-e5113a?ref=user&ref_id=124266&offset=3
Thanks

Like
0 like 
Award Contribution
under graduate ,Engineer,student
 · BhubaneswarIndia
Share
Report
Get Link

You can make use of two IR sensors placed at the front of the chassis on the left and right side .
If any sensors of the detect WHITE SURFACE output is high.

while(1)
{
if(LEFT SENSOR==LOW && RIGHT SENSOR==HIGH)
take left turn;
if(LEFT SENSOR==HIGH && RIGHT SENSOR==LOW)
take right turn;
if(LEFT SENSOR==HIGH && RIGHT SENSOR==HIGH)
take GO FRONT;
}

Like
1 like 
Award Contribution
Engineer
 · KannurIndia
Share
Report
Get Link

For making a line follower you need a sensor to identify the lines. There are some IR s3nsors available in the market, u can make use of those sensors. It’s better to buy an array of sensors. The values of sensors will depend on the hight and surrounding lights. Try to buy a polum sensor which is good from my experience…

Like
0 like 
Award Contribution
Leave a reply...
DISCOVER
CHAT
ALERTS
DISCUSSIONS
FEED
New Post
Facebook Share
Share Link
Help