Project 14 – Light Sensor

This project introduces a new component known as a Light Dependent Resistor, or LDR. As the name implies, the device is a resistor that depends on light. In a dark environment, the resistor has a very high resistance. As photons (light) land on the detector, the resistance decreases. The more light, the lower the resistance. By reading the value from the sensor, you can detect if it is light, dark, or anywhere between. In this project, you use an LDR to detect light and a piezo sounder to give audible feedback of the amount of light detected.

This setup could be used as an alarm that indicates when a door has been opened, for example. Alternatively, you could use it to create a musical instrument similar to a theremin. ...

Get Beginning Arduino now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.