2. Department of Electrical Engineering, RCST, Lahore
Line Follower Robot
BS Electrical Engineering, Semester Project
Supervisor
Sir Hamza Shahid(Lab Engineer, Riphah International University Lahore)
Co-Supervisors
Sir Hamza Shahid((Lecturer , Riphah International University Lahore)
Presented By:
Muhammad Hammad Aslam
CMS- 401471
Syed Hammad
CMS-401167
15. Coding loops and working of
UNO
Void loop()
Next to explain it
void setup() {
// put your setup code here,
to run once:
pinMode(lSinput, INPUT);
pinMode(mSinput, INPUT);
pinMode(rSinput, INPUT);
pinMode(rMU3, OUTPUT);
pinMode(rMD4, OUTPUT);
pinMode(lMU1, OUTPUT);
pinMode(lMD2, OUTPUT);
}
16. Code Partition of the
Project
First Partition
if (rin==LOW &&(lin== LOW)&&(Min== HIGH) ) // move forward
{
digitalWrite(lMU1, HIGH);
digitalWrite(lMD2, LOW);
digitalWrite(rMU3, HIGH);
digitalWrite(rMD4, LOW);
}
17. Second Partition
if (rin==LOW &&(lin== LOW)&&(Min== LOW) )// move back
{
digitalWrite(lMU1, LOW);
digitalWrite(lMD2, HIGH);
digitalWrite(rMU3, LOW);
digitalWrite(rMD4, HIGH);
}
18. Third Partition
if(rin==HIGH &&(lin== LOW)&&(Min== LOW) )// move RIGHT
{
digitalWrite(lMU1, HIGH);
digitalWrite(lMD2, LOW);
digitalWrite(rMU3, LOW);
digitalWrite(rMD4, LOW);
}
20. Conclusion
We have concluded that we can make any desired robot by using
microcontroller like in our project, we have used Arduino UNO R3
and given it some particular instructions from the code which you
have seen in our methodology. This project enhance our knowledge
and working skills regarding H-bridge and motor function, and also
motor driving with the help of Arduino and L293D.
21. Applications
Industrial automated equipment carriers.
Tour guides in museums and other similar applications.
Deliver the mail within the office building
Deliver medications in a hospital.