Aniket Mindhe
Published

Line Follower Robot

A simple Line Follower Robot developed using Arduino platform.

IntermediateFull instructions provided2 hours7
Line Follower Robot

Things used in this project

Hardware components

Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1
Dual H-Bridge motor drivers L298
SparkFun Dual H-Bridge motor drivers L298
×1
IR Proximity Sensor
Digilent IR Proximity Sensor
×2
Battery - 18650 - 7800mAh- 3.7V
×1
Battery Holder, 18650 x 2
Battery Holder, 18650 x 2
×1
9V battery (generic)
9V battery (generic)
×1
9V to Barrel Jack Connector
9V to Barrel Jack Connector
×1
BO Motor - Straight - 300rpm
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Ball Caster Wheel
×1
Chasis - Eg. Plastic Box Cover, Acrylic Sheet, Metal Sheet
×1
Toggle Switch, (Off)-On
Toggle Switch, (Off)-On
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Tape, Double Sided
Tape, Double Sided
Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free
Tape, Electrical
Tape, Electrical

Story

Read more

Schematics

Line Follower Robot

Connect them and get going !

Code

Line Follower Robot

C/C++
Download/Copy-Paste and compile+upload it using Arduino IDE
const int r1=13,r2=12,l1=11,l2=10; // Motor Pins
const int LS = 8; // Left Sensor At Pin-8
const int RS = 9; // Right Sensor At Pin-9
int L,R; // Variables To Store Sensor I/Ps

void setup()
{
  pinMode(LS, INPUT); // Set Left Sesnor Pin As I/P
  pinMode(RS, INPUT); // Set Right Sesnor Pin As I/P 
  pinMode(r1, OUTPUT); // Set Motor Pins As O/P
  pinMode(r2, OUTPUT);
  pinMode(l1, OUTPUT);
  pinMode(l2, OUTPUT);
  digitalWrite(r2,LOW); // Disable Right Motor From Going Backward
  digitalWrite(l2,LOW); // Disable Left Motor Fromm Going Backward
}

void loop()
{
  L = digitalRead(LS); // Capture Left Sensor I/P
  R = digitalRead(RS); // Capture Right Sensor I/P
  digitalWrite(r1, !R); // Move Forward/Stop Right Motor
  digitalWrite(l1, !L); // More Forward/Stop Left Motor
}

Credits

Aniket Mindhe

Aniket Mindhe

2 projects • 0 followers
Undergrad Electronics Engineering Student at D.J Sanghvi C.O.E.-Mumbai

Comments

Add projectSign up / Login