Blinking an LED
Let’s try to blink an LED every one second.
Connections:
- LED anode to pin 13.
- LED cathode to 220 ohms terminal 1
- 220 ohms terminal 2 to gnd.
![](https://skillanything.com/wp-content/uploads/2023/05/image10-1024x416.png)
For code click here:https://drive.google.com/file/d/1VmHlaT8UqxAs6VyexZ-yLhVWjQMAz3qb/view?usp=sharing
Once you upload the code to the Arduino uno then you will observe that led will turn on and off in every 1 second.
Reading the data from Light sensor
LDR( light dependent resistor changes its resistance as intensity of light changes). Hance detects the amount of light falling on it
In below example we will how to read the light intensity using LDR and arduino uno and print the data on serial monitor
Connections:
5V to terminal-1 of LDR
Terminal-2 LDR to 220 ohm resistor terminal -1
From the junction of LDR T2 to resistor T1 to Arduino uno pin A0
Resistor terminal 2- GND
For code click here: https://drive.google.com/file/d/1nfdYwaXUK_zw_DXGCvwskPs_fNMgRfbE/view?usp=sharing
As you can see that as light intensity changes the value printed on the serial monitor changes between 1 to 310
No Comments