Arduino LDR sensor + LED Tutorial

preview_player
Показать описание
Arduino LDR sensor + LED Tutorial
Photo-Resistor Sensor
LDR - Light Dependent Resistor

::::::::::: SUPPORT CHANNEL ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Don't forget to subscribe!
Рекомендации по теме
Комментарии
Автор

How to put time interval between turn on and turn off? Thanks.

marcelyeshl
Автор

i read book for learning Arduino and code don't work. I'm disapointed lol... thanks for this video, you code and circuit work... I just reverse the result : Led turn off with LDR is light ;)

This is my code :



const int ledPin = 12; // Attribute pin 12 to Led
const int ldrPin = A0; // Attribute pin A0 to LDR

void setup() {
Serial.begin(9600); // initiate monitor
pinMode(ledPin, OUTPUT); // pin 12 in exit
pinMode(ldrPin, INPUT); Pin LDR an entry

}

void loop() {
int ldrStatus = analogRead(ldrPin); // read LDR statut

// If LDR in dark
if (ldrStatus >=800) {
digitalWrite(ledPin, HIGH);
Serial.println("It's night, LED is ON"); // Put it on monitor
}
// If LDR on light
else {
digitalWrite(ledPin, LOW);
Serial.println("It's day, LED OFF"); // Put it on monitor
}

}

bricod
Автор

Creative video, thanks for sharing, like it :)

RixtronixLAB
Автор

All I want to do is be able to query, via a linux box, a light sensor for some numeric value that equates to the amount of light detected by the sensor. I assume that I would have to add a wifi module to the arduino, but I am not sure how I would 'publish ' the value or be able to query it. The LED output is irrelevant to my needs. Can you give me some advice on how to do that ? Thanks

hbosch
Автор

Which Type of Aurdino It is Can You Mention All The Details About Ratings

gbSS_tat
Автор

May i know. How can i connect many ldr sensor using it? 6 sensors and 6 led as output?

alistairagut
Автор

hey, can i ask a question? the cable color doesn't affect anything right?

martinpardede
Автор

It did not work, I can send a picture, if you could share your email address and help me where am I going wrong

vparthiban