LED Blink with Arduino
This is part of the starter blog for Arduino basics. Check out here to see all of them.
So, you have got your hands on an Arduino UNO and set up the Arduino IDE from here and you want to start your journey? Alright, now the very first thing you can do when you get your hands on an Arduino is to blink an LED. Don’t be disheartened if it feels too simple. You will soon move on to higher projects once you get down the basics. Lets get started!
~What you need~
The following are the parts you will need. Pretty simple.
- Arduino UNO
- 1k resistor
- PC with Arduino IDE
Following is an image of the listed parts.
~What to do~
Lets get down to the circuit.
- Take a 1k resistor and attach it to the –ve terminal of LED.
- Take the other end of resistor and connect it to the ground pin of the Arduino.
- Take the +ve terminal of led and connect it to pin 12 of Arduino.
connecting the led
- Type the following code in the IDE.
- Connect the Arduino to your PC and check the port from the tools menu and set it to Arduino. ( Don’t forget to check this part else you won’t be able to upload it. )
- Click on the upload button to upload the code (the small arrow mark on the top left corner of the IDE).
- That’s it! You are done, enjoy your first blink!
Now the question arises, what next? You can improve on it now that you’ve got the simple part. Try the following.
- Try varying the time of delay to see how it works.
- Try changing the led pin from 12 to any other pin and see how it works.
I guess you are ready to move on to other projects. Check out the following.
Make sure to ask any queries in the comment section below.