The light sensor or Light Dependent Resistor (LDR) (PGM5506) is used to measure intensity of light.
When light falls on the sensor, the resistance of the LDR changes.
Examples:
- Automatic Light- LDR based: sensor measures natural light in the room to switch the light on/off accordingly.
- Alarm clock: sensor measures sunlight entering in the room to sound morning alarm.
- Night-light for elderly people: sensor measure when there is less light in the room to turn on a night light for elderly people who cannot switch it on manually.
Units:
Pin:
- A1 pin on the SNT Kit PCB. (the light sensor is on the PCB and does not need other wire connections)
Code
- Click here for the code to test your light sensor.