0% found this document useful (0 votes)
4 views8 pages

Embded

Uploaded by

Cyrus Tom Simon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views8 pages

Embded

Uploaded by

Cyrus Tom Simon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Light Sensor Using Arduino

Cyrus Tom Simon


S6A 17
CHN19EC034
COLLEGE OF ENGINEERING CHENGANNUR

Type your text


AIM

To design a light sensor using arduino

OBJECTIVE
A Light Sensor is a device that detects light. It generates an output signal that is proportional to
the intensity of light. A light sensor measures the radiant energy present in the wide range of
frequencies in the light spectrum. Some of the common frequencies are infrared, visible and
ultraviolet.
A Light Sensor is also called as Photo Sensor or Photo electric Sensor as it converts light energy
or photons into electrical signals.

COMPONENTS REQUIRED

1.ARDUINO UNO
2.BREADBOARD
3.LDR MODULE
4.LED
5.JUMPER WIRES
BLOCK DIAGRAM
PROGRAM

const int ledPin = 9;


const int ldrPin = A0;
void setup() {
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
pinMode(ldrPin, INPUT);
}

void loop() {
int ldrStatus = analogRead(ldrPin);

if (ldrStatus <= 400)


{
digitalWrite(ledPin, HIGH);
Serial.print("Its Dark, led on:");
Serial.println(ldrStatus);

}
else
{
digitalWrite(ledPin, LOW);
Serial.print("Its Bright, led off:");
Serial.println(ldrStatus);
}

}
CIRCUIT DIAGRAM

SIMULATION OUPUT
PHOTO OF THE PROTOTYPE

You might also like