Starting arduino for beginner (Blinking LED)
Good Afternoon
Let's start to exploring arduino and learn how to operate and application in our daily life.
At first time, let's begin to know how to make blinking in arduino.
I am using Uno for study and development. you can use other arduino with same language algoritm.
Material needed:
- Arduino Uno
- IDE software for arduino. can download here.
- Computer (minimum requirement is OK).
First step:
Connect your Arduino uno to your PC by USB connection.
Open IDE sketch software from arduino.
I am using 1.0.5 r2 for sketching. it's compatible for me.
Write down the sketch or see the arduino web in here.
void setup()
{
// initialize digital pin 13 as an output.
pinMode(13, OUTPUT);
}
// the loop function runs over and over again forever
void loop()
{
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Upload to you Uno. and see the result. led is blinking every 1 second.
You can change the timing by changing value 1000ms with other value as you want.
this sketch could use as pulse generator for you any idea.
My next project would be show on next post.
Thanks.
Let's start to exploring arduino and learn how to operate and application in our daily life.
At first time, let's begin to know how to make blinking in arduino.
I am using Uno for study and development. you can use other arduino with same language algoritm.
Material needed:
- Arduino Uno
- IDE software for arduino. can download here.
- Computer (minimum requirement is OK).
First step:
Connect your Arduino uno to your PC by USB connection.
Arduino Uno |
I am using 1.0.5 r2 for sketching. it's compatible for me.
Sketch |
Add a LED or use onboard LED on pin 13. |
void setup()
{
// initialize digital pin 13 as an output.
pinMode(13, OUTPUT);
}
// the loop function runs over and over again forever
void loop()
{
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Upload to you Uno. and see the result. led is blinking every 1 second.
You can change the timing by changing value 1000ms with other value as you want.
this sketch could use as pulse generator for you any idea.
My next project would be show on next post.
Thanks.
Comments
Post a Comment