Arduino Light Detection Tutorial

Introduction: Arduino Light Detection Tutorial

About: Student, currently studying programming. Interested in Arduino, Raspberry Pi and Electronics in general.

After completing this tutorial, you will learn how you can detect changes in the light levels around you. The parts for this project were provided by Kuman. You can find them in their Arduino UNO Starter Kit.

Step 1: Parts Needed

  • Arduino Board (I'm using an UNO)
  • Breadboard
  • LDR
  • LED (Color doesn't matter)
  • 10k ohm Resistor
  • 220 ohm Resistor
  • 5 Jumper Wires

You will be able to buy the components that I've used on

Their store will be up by the end of January. Stay tuned!

Step 2: Making the Necessary Connections

Start with connecting the LED. The shorter lead of the LED (cathode, -) connects to Ground of the Arduino (GND). The longer end (anode, +) connects to one end of the 220 ohm resistor, with the other end going to Digital Pin 13 of the Arduino. The LED is now connected.

Now we continue with the LDR. One of it's ends connects to 5V and the other - to GND using the 10k resistor. Lastly, connect the same row (that goes to ground) to Analog Pin A0 of the Arduino. Make this connection after the resistor! You can use the second picture above for reference

Step 3: Uploading the Code and Finalizing

Connect the Arduino board to your PC and upload this code. You can modify it to suit your need. For example, you can change the value at which the LED lights up or the pins according to the connections you've made. Here is a simple video, showcasing the project in action:



    • Water Contest

      Water Contest
    • Tiny Home Contest

      Tiny Home Contest
    • Creative Misuse Contest

      Creative Misuse Contest