3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Arduino All-in-One Getting Started Guide

Arduino All-in-One Getting Started Guide
An all-in-one tutorial to getting started with the Arduino open-source electronics prototyping platform. This guide is meant for the beginner but should be also be useful to you if you already tinker with electronics but want to get started with the Arduino. I'll cover:

- breadboarding LED outputs from the Arduino
- creating and reading digital inputs to the Arduino
- how to program the Arduino to take the input and act on it to modify the outputs

Our demonstration project will consist of a set of three blinking LED's that blink in sequence. You'll control the speed of the blinks via a pushbutton controller. I've designed this project to be modular in nature: we can create a fairly complex effect, but I've wired and coded everything in a modular fashion to make it easier to follow. Of course, that means that neither the circuits nor the code are necessarily the most efficient way of doing things -- but the emphasis here is on making it clear and understandable.

Acknowledgement: I'd like to thank Lady Ada for her excellent set of tutorials on the Arduino which is where I first learned Arduino basics. I cover a lot of the same ground, but her work has a very different flavor and emphasis including a different set of circuits and programs. I recommend that you pay her tutorials a visit. You can also buy Arduino boards and an wide variety of shields and accessories for the Arduino from her company, Adafruit Industries.

Here's how the finished project behaves:


 
Remove these adsRemove these ads by Signing Up
 

Step 1Testing Your Board / Getting Started

Testing Your Board / Getting Started
If you have already connected an Arduino to your computer and run the basic "blink" example you can skip this step. However, if all you've done is unbox it, here's how to start:

1) Download the software you'll need from the makers: Software Download.

2) Install the software and connect your Arduino to your computer via a USB cable. It draws power directly from the USB port, so you don't need to connect a power supply to it at this point.

3) If you have a newer board you'll see a resistor next to pin 13 and an LED next to that. That LED works just as if it were connected between pin 13 and the ground (GND) pin next to it. If the LED is NOT on your board, just connect an LED between 13 and GND. You don't need to do anything else since a resistor is already built in and limits the current through the LED so you don't put your board at risk of a short circuit. NOTE: This resistor may not be present on really old boards (I just don't know), but I doubt you have one of those.

4) Set your board type and serial port under "Tools" in the software kit. The current version (at the time of writing) does not have an option for the newest Duemilanove boards, but choosing Diecimila works just fine.

5) Open the blink example from the software kit: It's under File | Sketchbook | Examples | Digital. The onboard LED (or the one you added) should blink on and off after you upload the Blink "sketch" (as Arduino projects are called) to the board (File | Upload).

When you write programs for your Arduino, you will normally do much of your debugging in the software development kit by doing a Verify/Compile before uploading, but since we just uploading a pre-built test sketch I skipped that here.

« Previous StepDownload PDFView All StepsNext Step »
61 comments
1-40 of 61next »
Mar 8, 2009. 11:37 AMtoelle says:
Just ordered an arduino duemilanove =D Cant wait to get my hands on it :P
Nov 29, 2011. 12:28 PMgeckomage says:
i have 4 of the new deumilanove atmega328's hope i dont fry them xD
May 16, 2010. 12:32 AMlouwhopley says:
 Be careful not to roast your first one! Stick with using USB power until you're pro. Enjoy :)
Feb 4, 2012. 7:43 AMyaly says:
I have an uno that I ordered from fut-electronics.com and because I live in Egypt it was delivered to me for total of 165 egptian pounds that I'm afraid to loss or fry because i think my dad won't let me buy any thing else from that web-site as it was delivered an empty arduino uno box sealed and sealed cable so the i told them on the phone they sent another one with the board inside!!
May 16, 2010. 2:37 AMtoelle says:
There's really not much that can go wrong with external power supply. Just make sure you've got the right polarity, and that it is no higher than 12VDC and you should be good.
But don't play with transistors :P .. I roasted 2 pins on my atmega168 by connecting transistors to it the wrong way, but I already ordered some new atmega328's :D
May 16, 2010. 5:34 AMlouwhopley says:
 Hahaha, i roasted my whole 328 :(

I also ordered a new one!
May 16, 2010. 6:28 AMtoelle says:
i'll try to be careful not to roast my 328's when i get them :)
Where do you order your chips from?

Atleast i only roasted 2 pins (so far) on my 168, so I can still use the other pins :)

May 16, 2010. 7:40 AMlouwhopley says:
I ordered my first Arduino from Italy which took too long so now I am ordering parts from the only local store we have in South Africa.
http://www.netram.co.za
Sep 12, 2011. 3:31 AMdasta says:
awesome!!!! i've been struggling with electronics123 cos they don't have much. now i haz a new place to gets my stuffs!!! thanks
May 16, 2010. 12:58 PMtoelle says:
Okay I ordered my first arduino from www.coolcomponents.co.uk, but now im ordering my parts from sparkfun.com .. Better prices, and more stuff :)
Jun 26, 2009. 11:06 AMReCreate says:
Yeah i am ordering one too!
Aug 9, 2009. 12:47 PMJodex says:
I ordered today Getting Started with Arduino kit from Makershed! Can't wait it to come all the way to Finland!!
Aug 9, 2009. 12:50 PMReCreate says:
Wow Finland? I'm gonna get mine soon...eventually XD
Aug 9, 2009. 1:07 PMJodex says:
Mine is gonna take a liiitle more than the 3-5 days.. Someone got one from US to Canada in a week... Well I just hope that I'd get mine in about one and a half week
Sep 19, 2009. 11:29 AMReCreate says:
i got mine now! :D Did you?
Sep 19, 2009. 12:08 PMJodex says:
About four (five) weeks ago... :)
Sep 19, 2009. 2:07 PMReCreate says:
Ah :D Last month?
Sep 20, 2009. 1:46 AMJodex says:
Yes
Sep 20, 2009. 9:55 AMReCreate says:
What have you done with it so far?
Sep 20, 2009. 11:45 AMJodex says:
The Blinking LED, of course :D The EMF detector is awesome invention and I added a piezo buzzer to mine. And I've done some FSR (force sensing resistor) LEDs and knight rider lights and many others.. The sample code "Melody" was nice too, and of course with my own modification ;) What you have done? Do you recommend some project? I recommend warmly the EMF detector by Aaron Alai.
Sep 20, 2009. 1:01 PMReCreate says:
The blinking LED, Getting readings from potentiometers, And even a siren!(based on melody code) Would you like the siren code?
Sep 20, 2009. 1:10 PMReCreate says:
Here
Aug 9, 2009. 5:16 PMReCreate says:
Yeah, Where did you buy yours from?(also, Is finland near italy?(italy is where arduino's are made))
Aug 10, 2009. 1:07 AMJodex says:
I ordered from USA Makershed. Finland is one of the Northest countries and Italy pretty much at the Southest end of Europe. So it might take some time to get over the ocean and here...
Sep 7, 2011. 4:19 PMijabi says:
Hi To All
I need your help.I have Arduino Duemilnove but nothing happen when I plug it through USB.The first time I plugued it it went through the installation.but when I plug it now the computer does not detect it!
another thing I downloaded all the drivers but when I try to unzip them ,they are kind of non-executable!?what to do .your help is greatly appreciated.Thanks again.
Ijabi
Jul 17, 2011. 5:58 AMrobot1398 says:
and i have a arduino uno
Jul 17, 2011. 5:57 AMrobot1398 says:
do i have to reset my arduino before loding another code or i have to erase the old code or just programme the new program
and how many pin switch did u use 4 or 2
Mar 15, 2011. 4:59 PMmcmahanly says:
I'm completely new with programming. don't even know much about computers. Can somebody please explain to me what means what here. why am i typing int before everything. is there somewhere i can reference all of these terms?
Feb 11, 2011. 9:48 AMekhurley says:
I just bought The getting started book and a kit, and they keep mentioning using a resistor on some pins but not others, thank you for finally explaining why.
Jun 2, 2009. 6:45 PMDirtMcGurt says:
I'm new to this stuff but wouldn't that be a pull down?
Mar 16, 2009. 5:11 PMetni3s says:
I have a slightly different setup: both resistors are 220 ohm.

The button: white - pin 2, orange - 5V, blue - ground.

The diodes: All white cables are connected to ground on this part of the bread board. Connect ground to resistor and then all diodes to the other end of the resistor.

I also modified the code to fix some bugs and look better in general (in my opinion): http://pastebin.com/f4474a984

Larger pictures: 1, 2, 3.
Mar 16, 2009. 6:17 PMetni3s says:
(Note that the code says i use 5 LEDs but the pictures only show 4. This is because I updated the code after I took the pictures.)
Feb 9, 2009. 1:59 PMgeeklord says:
Woo Hoo! I ordered my arduino yesterday, and i geuss its supposed to get here today......
Feb 14, 2009. 9:50 AMgeeklord says:
Its not working for me....... Here's the question i posted.
Jan 31, 2009. 8:40 PMalex-sharetskiy says:
Something i should do! as soon as i get enough money
Feb 6, 2009. 9:11 AMamando96 says:
you can buy the ATmega168 for 3 euros...
1-40 of 61next »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
12
Followers
1
Author:gunnk
One of my first memories is Apollo 11. Guess that set the stage for everything else. I have a degree in physics, researched indoor air pollution for several years, then moved on to IT *before* the d...
more »