D's Cyber Junk
Archives
Total Pageviews
Followers
Sunday, March 2, 2014
Hi guys ... Today I'm gonna show you how to create simple LED protect.
You may think " I can do these projects without Arduino .... this is use less ".
But Don't forget this "BIG THINGS HAVE SMALL BEGINNINGS"...
So lets Start ...
You will need ...
1.LED's
2. 100Ω Resisters
3.Bread Bord
4.Jumper Wires
Ok ... First You Should Setup The Circuit..
Connect GND to GND of the Led,Normally it is short pin of the LED,and connect other pin Using a Resistor to PMW pin in the Arduino(The Pins With (~) mark..
Ok now comes the Programming part ... If you're Familiar With C++ Or C programming language .This part will be very easy.... I will Add the Code bellow and Explain it one by one ..
int ledPin=10; >> In this line we are creating integer variable.And we set our led pin as the value.
void setup() >> This is a Setup function in the Arduino.In this function we do main settings,setting up pin Modes,Starting Serial connections,Attaching the servos,.... Etc .......
When Arduino Starting,First of all it runs the setup function one time.After that it goes to loop function.
pinMode(ledPin,OUTPUT) >>>> In this part we says to arduino ,How we going to use the ledPin(Or pin 10).In this case we are using it as output.
void loop() >>> This is the another main function in arduino. After executing the setup function.This function start to running continuously.
digitalWrite(ledPin, HIGH); >>> in this line ,We set ledPin voltage to 5V.(Or high Voltage )
HIGH=5V LOW=0V or GND
delay(1000); >>>> in this part we set a delay to programme.We have to set our delay in milliseconds.So
1000 milliseconds=1 Seconds .So programme go to that line ,and wait for 1second before execute the next line .
digitalWrite(ledPin, LOW); in this line ,We set ledPin voltage to 0V.
So that's it ............ Now you can see The LED is blinking each one second.
It is not sooooo cool ah ?
So lets develop the sketch little bit and see what happens.That Will be cool. See You in the next lesson .
Note:-You Can Post any comments & Ideas in the page.And i apologize about my bad English.
You may think " I can do these projects without Arduino .... this is use less ".
But Don't forget this "BIG THINGS HAVE SMALL BEGINNINGS"...
So lets Start ...
You will need ...
1.LED's
2. 100Ω Resisters
3.Bread Bord
4.Jumper Wires
Ok ... First You Should Setup The Circuit..
Connect GND to GND of the Led,Normally it is short pin of the LED,and connect other pin Using a Resistor to PMW pin in the Arduino(The Pins With (~) mark..
Ok now comes the Programming part ... If you're Familiar With C++ Or C programming language .This part will be very easy.... I will Add the Code bellow and Explain it one by one ..
int ledPin=10; >> In this line we are creating integer variable.And we set our led pin as the value.
void setup() >> This is a Setup function in the Arduino.In this function we do main settings,setting up pin Modes,Starting Serial connections,Attaching the servos,.... Etc .......
When Arduino Starting,First of all it runs the setup function one time.After that it goes to loop function.
pinMode(ledPin,OUTPUT) >>>> In this part we says to arduino ,How we going to use the ledPin(Or pin 10).In this case we are using it as output.
void loop() >>> This is the another main function in arduino. After executing the setup function.This function start to running continuously.
digitalWrite(ledPin, HIGH); >>> in this line ,We set ledPin voltage to 5V.(Or high Voltage )
HIGH=5V LOW=0V or GND
delay(1000); >>>> in this part we set a delay to programme.We have to set our delay in milliseconds.So
1000 milliseconds=1 Seconds .So programme go to that line ,and wait for 1second before execute the next line .
digitalWrite(ledPin, LOW); in this line ,We set ledPin voltage to 0V.
So that's it ............ Now you can see The LED is blinking each one second.
It is not sooooo cool ah ?
So lets develop the sketch little bit and see what happens.That Will be cool. See You in the next lesson .
Note:-You Can Post any comments & Ideas in the page.And i apologize about my bad English.
Subscribe to:
Post Comments
(Atom)
Search
Popular Posts
-
Hi I'm D ... Actually im not a expert in Arduino.. I'm a noob.. But i really wanted to learn Arduino.So i started my journey ...
-
Setting Up Your Arduino First of all you need to buy arduino.You can Buy original arduino or a clone. If your buying Original Arduino,Ard...
-
Hi guys ... Today I'm gonna show you how to create simple LED protect. You may think " I can do these projects without Arduino ......
-
Armed only with their cameras, Peabody and Emmy Award-Winning conflict Journalist Mike Boettcher, and his son, Carlos, provide unprecedent...
-
*****Mr.D ගෙ` Arduino අත්දැකීම(Part 1)***** පහුගිය දවස් ටිකේම කට්ට කාලා මාත් බැස්සා බ්ලොග් ලියන්න.Site එක ලස්සනට තියෙන වානේ :) හරි එහ...
-
Sam & Fordy run a credit card fraud scheme, but when they steal from the wrong man, they find themselves threatened by sadistic gangst...
-
An Indian Intelligence agent (portrayed by John Abraham)[9] journeys into a war torn coastal island, to break a resolute rebel group. He...
-
Beyond the limits of civilization lies an island, a lawless place ruled by piracy and human misery, where your only escape is thr...
-
DOWNLOAD TORRENT As a true sequel, this game moves the battle away from the common Western Front focus of World War II and ...
-
Assassin's Creed IV: Black Flag is a free-roaming action adventure game for both current gen and next gen consoles. Players will ...
0 comments:
Post a Comment