Light Follower Robot Using Arduino

911

13

Posted

Introduction: Light Follower Robot Using Arduino

The circuit is used to control a robot by increasing or reducing the light intensity.circuit components are,

potential meter,arduino uno,operational amplifier, npn darlington transistor, motor,Ldr-light dependent resistor,

Step 1:

Step 2: Working

when the intensity of light to the ldr is increased current flows to the amplifier then to the arduino.This causes the motor to rotate,.The motor rotates the wheels of the robot

Step 3: Code

int in=13;

int out=12;

int pinState=0;

void setup() {

pinMode(in,INPUT);

pinMode(out,OUTPUT); // put your setup code here, to run once:

}

void loop() {

pinState=digitalRead(in);

if(pinState==HIGH)

{ digitalWrite(out,HIGH);

} else

{ digitalWrite(out,LOW);

} // put your main code here, to run repeatedly:

}

Share

    Recommendations

    • Microcontroller Contest

      Microcontroller Contest
    • Science of Cooking

      Science of Cooking
    • Pocket-Sized Contest

      Pocket-Sized Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    Comments