Hello everyone, Welcome to my first instructable.
In this instructable we'll be learning how to program an Arduino UNO to blink a LED.
Hookup all the components according to the circuit diagram shown above.
Now, why we need a 220 ohm resistor in the circuit above?
The ordinary LED operates on Low current values than what a arduino gives.
So, In order to limit current through the LED we add a 220 ohm resistor in series with the LED to increase the overall resistance and to decrease value of current through the LED to prevent it from burning.
Start the Arduino IDE
And, load the 'Blink' sketch that you will find in Arduino IDE under File > Examples > 01.Basics > Blink
Or, copy it from below:
// the setup function runs once when you press reset or power the board
void setup() {
pinMode(13, OUTPUT); // initialize digital pin 13 as an 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
}
Then, click on upload.
Once the uploading process completes you could see your LED blinking.
What next?
Now, all you need is to play with the program.
Thanks for viewing.
Please write your questions or suggestions below.