Introduction: Smart Light Switching With LinkitONE

Hello friends do you know about basic electronics. Have you ever heard about LinkitONE...With it we can create those short of electronic things which we can only think about...Working with Linkit makes it really easy to fulfil our dreams and bring it into action in front of the entire world.....Today I am going to present a small view of the project which can be done using an board as compare to those great project which can be done using it....

The LED will be switched on when the intensity of light is low and it will be switched off when the intensity of light is high (using an LDR).
Note: - An LDR or a photo resistor is a variable resistor that changes its resistance based on the amount of light that falls on its face.....

Step 1: Tools Required

1. Arduino
2. Bread Board
3. Male jump wires
4. 220 OHM Resistor
5. 10 Kilo OHM Resistor
6. Single color LED
7. LDR

Step 2: Programming

This the programming in the project.

void setup()
pinMode(A0, INPUT); \\it defines the analog pin A0 as input
pinMode(11,OUTPUT); \\it defines the digital pin 11 as output
Serial.begin(9600); \\it begin serial communication at 9600 bps
void loop()
int a;
a=analogRead(A0); \\the loop reads the sensor value on A0 with analogRead() and store the
value in the appropriate variables
Serial.print(a); \\it prints the value of a in the serial monitor
Serial.print("\n"); \\("\n") is the equivalent of pressing the "ENTER" key on the keyboard
if(a<1000) \\it is a conditional statement
digitalWrite(11,HIGH); \\it commands the arduino to switch on LED if the LDR sends the reading less
than 1000
digitalWrite(11,LOW); \\it commands the arduino to switch of LED if the LDR sends the reading greater
than 1000
delay(1000); \\it calls a delay for 1 second or 1000 millisecond’s

Burn this code to your arduino.

Step 3: Connecting - LDR

Step 1
Take an arduino and connect it with your laptop.
Step 2
Take a breadboard and place an LDR on it.
Step 3
Connect the 5 volt pin of your arduino with one end of the LDR placed on the breadboard.

Step 4: Connecting - LED

Step 6
Now connect the digital pin 11 from the positive terminal of your single color LED.
Step 7
Place a 220 OHM resistor between them.
Step 8
Ground the LED from its negative terminal.

Step 5: Connecting - Battery

Connect your battery.

Step 6: Trying It

Try the project now. Keep a torch above your LDR. You will see a difference.

Step 7: Thank You

This project teaches you some basic facts about Linkit and will make you able to do basic projects with the board.
You will be able to understand the basic use of the new board with the description’s given above.