Basic LED blinking w/ Arduino

Hi and welcome to the first official post of PrinceTronics.com!

First off to test if your Arduino is working with a classic LED blinking test.

Before we go into the project, some things need to be explained so you won’t be confused by the images you will see later.

I mounted my Arduino and breadboard to the cap of a food box. This way I easily keep together my projects and easily store and carry it around. Also I currently have a button mounted on the corner of the breadboard to further simplify tests I perform during my projects. All this isn’t necessary for this project but simplifies my workspace and further increases my productivity for future projects. The red and blue intertwined cables are connected to the 5V- and ground-pins on the Arduino and the breadboard. The long black cable its the cable for the output of the cornered button. Under the Arduino is an old card which is glued to the food box cap. This way I can easily remove  the Arduino if I have to.

IMG_0659

So now lets start our first project!

Requirements

  • Arduino (Duh)
  • Two breadboard jumper wires male to male
  • 330 Ω resistor
  • LED

Connecting the hardware

The LED has a long pin and a shorter pin, the longer pin is the anode which should always be connected to the voltage output of the Arduino or any component., in this case it should be connected to the resistor. The shorter pin the cathode and is connected to the GND-pin on the Arduino, which is the pin for ground. The resistor’s other end is connected to the Arduino pin 13. Thank god this is illustrated in the image below.

led

 

Programming the Arduino

Next step is to use the Arduino app. I’m not going to go through the installation process. There are tons of tutorials online if you need help installing apps on Windows, Mac and Linux.

Now open up Arduino app and paste the code below. This is taken from one of Arduino’s example sketches names “Blink”.

You can access this and other Arduino Sketches directly from the Arduino program
“Up arrow button” –> 01.Basics –> Blink

Screen-Shot-2014-01-30-at-02.45.26Or you can just go File –> Examples –> 01.Basics –> Blink

To upload the code to the Arduino, connect the Arduino to your computer with the USB-cable and press the “Right arrow button”, or just go “File –> Upload”.

After a few seconds your LED should be blinking!

IMG_0657

 

If you have any questions feel free to ask me by using the Contact page or by commenting below.

Prince

A second year computer engineering student at Malmö University in Sweden just having some fun with this blog. Computer Engineering and Mobile IT: Bachelor of Science in engineering

You may also like...

2 Responses

  1. Levent Unan says:

    Hi Prince,

    I do benefit a lot from your site, but I have a problem I could not solve and could not find the answer here, hope you can help me. It is:

    I manage to blink the leds first with10 times with 1000ms delay, then 10 times with 500ms delay and then 10 times 100ms delay. So after 30 blinks the loop stops. Then I wanted to start the loop by a push button, but as soon as I remove my finger from the push button, the loop stops. How can I make the loop complete, even if I press the button for a very short time (like a short signal starting a loop).

    I’d really appreciate your answer

    Best regards, Levent

  2. will steve says:

    hay dood nise werk tank you
    \

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.