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
- Light sensor
- BC547 transistor
- Jumper wires
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.
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.
Next, connect your light sensor to linkit one as per the following:
- Vcc sensor ------------------- 5v Linkit
- Gnd -------------------------- Gnd
- Vout ------------------------- A0
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.
if(analogRead(A0) > 600)
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!!
7 years ago
Cool way to make a light sensor.