loading

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:

}

About This Instructable

829views

13favorites

License:

More by DavidM386:LCD and keypad interface Interfacing Keypad and LCD with Intel Galileo Light follower robot using Intel Galileo 
Add instructable to: