Arduino LDR controller
the circuit diagram here
FIRST YOU MUST GET THE VALUE FROM THE LDR READING FOR WHAT BRIGHTNESS
YOU WANT TO CONTROL WITH THE SERIAL MONITOR
the ldr value reading cord is here
int sensePin =0;
void setup()
{
analogReference(DEFAULT);
Serial.begin(9600);
}
void loop() {
Serial.println(analogRead(sensePin));
delay(500);
}
after getting the value of ldr with the serial monitor
then the led controlling cord is follow . in this cord we set it when the led valu is <150
LED ON else LED OFF
the cord is follow
int sensePin =0;
int ledPin = 13;
void setup()
{
analogReference(DEFAULT);
pinMode(ledPin, OUTPUT);
}
void loop()
{
int val = analogRead(sensePin);
if(val <150) digitalWrite(ledPin, HIGH);
else digitalWrite(ledPin, LOW);
}
after this we programming for controlling the led brightness when led values changing
- ARDUINO
- arduino-tempertuer-controller
- how to burnbootloarder and power circuit
- Visual- development-tool\for\Arduino
- Arduino sonar system
- arduino\ toilet-flusher
- arduino-ir remote\controller
- simple arduino\line\following\robot\with\LDR
- arduino keypad\password controller
- arduino\for proteus
- Arduino-ldr-controller
- Arduino-ultrasonic-sensor
- ELECTRONIC
- ELECTIRCAL
- MECHATRONICS
- solidworks
No comments:
Post a Comment