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
2. Bread Board
3. Male jump wires
4. 220 OHM Resistor
5. 10 Kilo OHM Resistor
6. Single color LED
Step 2: Programming
This the programming in the project.
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
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
digitalWrite(11,LOW); \\it commands the arduino to switch of LED if the LDR sends the reading greater
delay(1000); \\it calls a delay for 1 second or 1000 millisecond’s
Burn this code to your arduino.
Step 3: Connecting - LDR
Take an arduino and connect it with your laptop.
Take a breadboard and place an LDR on it.
Connect the 5 volt pin of your arduino with one end of the LDR placed on the breadboard.
Step 4: Connecting - LED
Now connect the digital pin 11 from the positive terminal of your single color LED.
Place a 220 OHM resistor between them.
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.