In the video we explaining how to convert light depending resistor into sensor using arduino We are separated this experiment into two section are 1. 5V DC power sourse 2. 240V AC power sourse 1. 5V DC POWER SOURSE first connect the ldr and 220ohm resistor in series and first end for ldr is connect to the 5v DC pin in arduino and one end of resistor is connect to the ground of the arduino uno board.connect the middle of ldr and resistor in A0 (analog 0 pin ) of arduino. connect LED positive terminal in d3 (Digital pin 3) and connect the negative terminal in ground of arduino *CODING* void setup() { pinMode(3, OUTPUT); Serial.begin(9600); } void loop(){ int a= analogRead(A0); Serial.println(a); if (a<=20){ digitalWrite(3,HIGH); Serial.println("LED ON"); } else digitalWrite(3,LOW); Serial.println("LED OFF"); { delay(1000); ...
Search This Blog
TECH HTTPS தமிழ்