KRIVANJADIYables
Published © GPL3+

Working with Light Dependent Resistor (LDR)

This illustrates the working with LDR

BeginnerProtip36,078
Working with Light Dependent Resistor (LDR)

Things used in this project

Story

Read more

Schematics

Breadboard Diagram

Make connections as shown in the breadboard diagram

Connections

The figure shows the close up of the connections

Code

Code

Arduino
The program prints the value of LDR to Serial Monitor
const int LDR = A0;
int input_val = 0;

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  input_val = analogRead(LDR);
  Serial.print("LDR Value is: ");
  Serial.println(input_val);
  delay(1000);
}

Credits

KRIVANJA

KRIVANJA

37 projects • 52 followers
www.krivanja.dev
DIYables

DIYables

0 projects • 77 followers
I would like to invite you to join and add your projects to DIYables platform https://www.hackster.io/diyables

Comments