Site icon 14core.com

Starter #15 Using Photo Resistor and LEDs

This sketch guide you to create a LED animation transition using LDR ( Light Dependent Resistor) with Arduino. Photo Resistor are variable resistor which change resistance depending on the light hitting the sensor. When you put your hand closer to the sensor, you block an increasing the amount of light, which increases the resistance of the LDR. as you move your hand away the amount of light hitting the surface of LDR increase thus decreasing the resistance.

The change in the resistance of the LDR(Light Dependent Resistor) will affect the voltage being read at one of the Arduino’ Analog Input (A0). As resistance increase, the voltage drops (and vice versa).

V = IR ( V = Voltage / I = Current / R = Resistance )

Voltage reading will be used to select which LED to light up.

Electronic Parts Required

 Arduino Sketch
[crayon-672a0c74dc6a0452634026/]
 

Starter #15 Using Photo Resistor and LEDs
Exit mobile version