G3 - Use LDR as analog input
-
Create this circuit with these components.
LDR Sensor 10kΩ Resistor
ΩTo learn more about resistor values, head over here (Links to an external site.).
-
Create a program that shows the A0 value from Arduino.
-
What is the LDR value when it is bright or dark?
LDR forms a voltage divider circuit.
Resistance of LDR changes with brightness, which changes the input voltage.
-
⭐BONUS⭐ Add an LED and create a night light that only lights up when it's dark!
Source: osoyoo.com (Links to an external site.)