In this project we’ll be creating a light alarm. As it may be obvious from the name, this alarm triggers when there’s a source of light directed at it.

What you’ll need for this to work is:

  • Arduino Uno
  • Breadboard
  • 10 breadboard wires
  • 2 LEDs
  • 3 resistors – 220 Ω
  • Photosensitive resistor LDR
  • Buzzer
  • USB-B cable (or something else to power the Arduino)

Once you have all the components, connect them like this.

Once that’s done, we need to code the sensor, LEDs and the buzzer. We’re going to read the value from photosensitive resistor and we’ll compare it with another value. If resistor’s value is higher than the value we set, it’s going to trigger the alarm. We can set the value from 0 to 1023, depending on how bright our surroundings are. You can play with the values or you can precisely tell at what value you want the alarm triggered. For that, take a look here.

And that’s it! It should be working now, but if it isn’t, leave us a comment down below and we’ll try to help you.

One thought on “Light Alarm – Arduino tutorial

  1. Fritzing is not necessarily a bad program.

    To many users of Fritzing are lazy and inaccurate and create bad schematics with
    Lines that cross and cover each other and do not clearly indicate connections
    Somewhat like a surgeon using a box cutter !!

    A good schematic is easy to read and shows all connections

    Reply

Leave a reply

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

required