Linkit ONE Dark Detector

Published

Introduction: Linkit ONE Dark Detector

This instructable will guide you to make a dark detector with Linkit ONE.

It makes use of light dependent resistor to detect darkness and switch on an LED as indicator. Linkit one takes analog input from LDR then switches the LED accordingly.

This project can be extended to make automatic home lights and street lights which on automaticaly as it turns dark.

So let's begin........

Step 1: Parts Required

The following parts are required to make this project:

- Linkit ONE
- Battery
- Light sensor
- LED
- BC547 transistor
- Breadboard
- Jumper wires

Step 2:

The first very basic step is to connect the linkit one battery to it. For this, you just have to plug it in your linkit one.

Step 3:

The next step is to connect an LED to linkit one. You can follow the images above. You may need to use a BC547 transistor or the brightness of the LED would be too low. I connected the LED to digital pin 2.

Step 4:

Next, connect your light sensor to linkit one as per the following:

- Vcc sensor ------------------- 5v Linkit
- Gnd -------------------------- Gnd
- Vout ------------------------- A0

Step 5:

Upload the code given below by copying it and pasting to your IDE. The switches on linkit one should be in SPI, USB, UART modes.

\\
void setup()
{
pinMode(2, OUTPUT);
}
void loop()
{
if(analogRead(A0) > 600)
{
digitalWrite(2, LOW);
}
else
digitalWrite(2, HIGH);
}
\\

Step 6:

Finally, after completing everything, switch the device on. Initially, the LED would be off but when you switch off your room lights or go to a dark room, the LED would glow indicating darkness.

This is the end of this instructable. Thanks for watching!!

Share

    Recommendations

    • Woodworking Contest

      Woodworking Contest
    • Microcontroller Contest

      Microcontroller Contest
    • Make it Move Contest

      Make it Move Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    Comments