Close

G3 - Use LDR as analog input

  1. Create this circuit with these components.

    LDR Sensor
    10kΩ Resistor
    LDR.png 10kΩ resistor.png

    G3 - LDR Sensor.png

    To learn more about resistor values, head over here (Links to an external site.).




  2. Create a program that shows the A0 value from Arduino.

    G3 - LDR Sensor program 1.png



  3. What is the LDR value when it is bright or dark?

    G3 - LDR cover-uncover w Tobi-2.png

    LDR forms a voltage divider circuit. 

    Resistance of LDR changes with brightness, which changes the input voltage. 





  4. BONUS⭐ Add an LED and create a night light that only lights up when it's dark!

    photoresistor.gif
    Source: osoyoo.com (Links to an external site.)