Light Sensor
In this project, you'll learn how to use a light sensor to automatically turn on and off a LED. The light sensor is a photo resistor that can sense the amount of light in a room. So by connecting a light sensor and a LED to the Arudino, the LED can be automatically turned on when the room is dark and turned off when it is bright.
Unlike a switch (such as the push button or the tilt sensor) that can only be either turned on or off, a photo resistor can allow varying amounts of electricity to pass through depending on its resistance just like a regular resistor. An electric signal having a range of values is called an analog signal as opposed to a digital signal with only a HIGH or LOW value.
To read an analog signal from the photo resistor, we need to use one of the analog input pins on the Arduino. There are six analog input pins on the Arduino board labeled A0 to A5.
Parts needed:
|