DIY Light Rollowing Robot UNASSEMBLED

949

New product

Video

DIY Light Rollowing Robot UNASSEMBLED

More details

₨ 2'400

Add to wishlist

More info

Programming file is here.

//WWW.HALLROAD.ORG
/* BY IRFAN AHMAD
*/
int MAX = 4; //DEFINING PINS
int MAY = 5;
int MBX = 6;
int MBY = 7;

void setup() {
Serial.begin(9600); Serial.println("Start"); // FOR DEBUGGING
pinMode(MAX, OUTPUT);
pinMode(MAY, OUTPUT);
pinMode(MBX, OUTPUT);
pinMode(MBY, OUTPUT);
}
/////////////////
void loop() {
int LDR_RIGHT,LDR_LEFT;
LDR_RIGHT = analogRead(A1);Serial.print("LDR_RIGHT ");
Serial.print(LDR_RIGHT);// READ VALUE AND SEND TO SERIAL PORT FOR DEBUGING
LDR_LEFT = analogRead(A0);
Serial.print(" LDR_LEFT ");
Serial.println(LDR_LEFT);

if((LDR_RIGHT >50 || LDR_LEFT>50 )) /// CHECK IF THERE IS NO DARK
{
// IF NO DARK THEN DO THIS
if(LDR_RIGHT>(LDR_LEFT+10)) right();
else if(LDR_LEFT> (LDR_RIGHT+10)) left();
else forward();
delay(50);STOP();delay(10);
}
else delay(50);
}
////////////
/////////////////////////////// MOTOR DRIVING FUNCTIONS .
void forward()
{
digitalWrite(MAX,HIGH);
digitalWrite(MAY,LOW);
digitalWrite(MBX,HIGH);
digitalWrite(MBY,LOW);
}
/////////////
void reverse()
{
digitalWrite(MAX,LOW);
digitalWrite(MAY,HIGH);
digitalWrite(MBX,LOW);
digitalWrite(MBY,HIGH);
}
void right()
{

digitalWrite(MAX,LOW);
digitalWrite(MAY,LOW);
digitalWrite(MBX,HIGH);
digitalWrite(MBY,LOW);
}
void left()
{

digitalWrite(MAX,HIGH);
digitalWrite(MAY,LOW);
digitalWrite(MBX,LOW);
digitalWrite(MBY,LOW);
}
void STOP()
{
digitalWrite(MAY,LOW);
digitalWrite(MAX,LOW);
digitalWrite(MBY,LOW);
digitalWrite(MBX,LOW);
}

/////////////////////////

Lit of parts included in this project are listed here 


L298 H BRIDGE MODULE
Reference number 13
₨ 250 1 0 84 ₨ 250
2WD SMART ROBOT CAR CHASSIS KIT
Reference number 313
₨ 1'050 1 0 85 ₨ 1'050
Male 2.1x5.5mm DC Power Plug Jack Adapter Wire Connector 
₨ 30 1 0 972 ₨ 30
Female 2.1x5.5mm DC Power Plug Jack 
₨ 40 1 0 995 ₨ 40
Arduino UNO With USB Cable
Reference number 345
₨ 615 1 0 881 ₨ 615
2 position Rocker Switch 4 legs in Pakistan
Reference number 260
₨ 25 1 0 972 ₨ 25
4V 1Amp Battery HQ
Reference number 311
₨ 80 2 0 957 ₨ 160
LDR 5MM 5pcs
Reference number 299
₨ 50 2 0 889 ₨ 100
Aurdino jumper wire male to female
Reference number 22
₨ 150 1 0 498 ₨ 150
1/4 WATT 5% RESISTOR 20Pcs - RESISTANCE : 10K
Reference number 123
₨ 10 1 0 99897 ₨ 10

Reviews

No customer reviews for the moment.

Write a review

DIY Light Rollowing Robot UNASSEMBLED

DIY Light Rollowing Robot UNASSEMBLED

Video

DIY Light Rollowing Robot UNASSEMBLED

Download

ARDUINO PROGRAM FILE

ARDUINO PROGRAMMING CODE

Download (754)