Linkit ONE Dark Detector

by Diwask in Circuits > Sensors

550 Views, 4 Favorites, 0 Comments

Linkit ONE Dark Detector

temp_323841534.jpg
temp_951263408.jpg
temp_259513985.jpg
temp_1092529716.jpg
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........

Parts Required

temp_-1900190725.jpg
temp_-42209368.jpg
temp_-42209368.jpg
temp_1848882866.jpg
temp_-575115111.jpg
temp_1755467435.jpg
temp_1848882866.jpg
The following parts are required to make this project:

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

temp_544748071.jpg
temp_1580783924.jpg
temp_125419157.jpg
temp_-1781684152.jpg
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.

temp_-1908023842.jpg
temp_942337840.jpg
temp_1397179004.jpg
temp_-1278825122.jpg
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.

temp_-864262243.jpg
temp_2095760792.jpg
temp_1018526225.jpg
Next, connect your light sensor to linkit one as per the following:

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

temp_-629521726.jpg
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);
}
\\

temp_2047772604.jpg
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!!