Light Detector

Uses

light dependent resistor (LDR), LED light

Description

../../_images/light-detector.png

In this project, you will be creating a light detector that will detect light using the light detecting resistor (LDR) and display a sun image if there is light, and moon image if there is not enough light.

../../_images/street-light.jpg

Light sensors are usually used in street lights where it detects whether it is already night time and switch on the lights.

Basic Task

  1. Read analog signal on pin0. The higher the reading (max is 1024), the higher the voltage. You might need to calibrate the value first, so you can use the print() command to print out the measurement to the REPL and try out with lights turned on and off.
  2. Compare measured value with your threshold value based on your calibration. This will determine if you need to display the sun or moon image.
  3. Display the sun or moon image depending on the reading.