Instructables
Picture of 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
1-40 of 66Next »
Grimling18 days ago

Hi , thansk for the tutorial , it was clear and it works , even i have a Arduino Mega2560 everything is fine. I just dont get the last bit with the serial.print function.

Could you specify this ? Where do i add the code ? Into the monitor send ?

this is a great tutorial about Arduino. also, I write a comprehensive tutorial about how to start using Arduino boards and resources
mvanderdeen2 years ago
this may be a little late (and possibly make me sound like an idiot) but here goes, i was wondering if thats all code or if your instructions are included in the coding above?
gunnk (author)  mvanderdeen2 years ago
Download the file at the end called "KevinsArduinoTutorial.cpp". That's JUST the code and you can use it as-is in the Arduino IDE (the program editor). In the text on this Instructables page, the code starts with the line:

/*

and ends with the final

}

on the page.

Don't worry about sounding like an idiot! If you aren't tackling new subjects where you don't know anything at all, then you aren't reaching your potential. The smartest people I know are the least afraid of looking like an idiot -- so they fearlessly ask "dumb questions" all the time!
Thanks for the help, and the motivation great instructable by the way :)
toelle5 years ago
Just ordered an arduino duemilanove =D Cant wait to get my hands on it :P
 Be careful not to roast your first one! Stick with using USB power until you're pro. Enjoy :)
yaly louwhopley2 years ago
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!!
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
 Hahaha, i roasted my whole 328 :(

I also ordered a new one!
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 :)

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
awesome!!!! i've been struggling with electronics123 cos they don't have much. now i haz a new place to gets my stuffs!!! thanks
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 :)
i have 4 of the new deumilanove atmega328's hope i dont fry them xD
ReCreate toelle5 years ago
Yeah i am ordering one too!
Jodex ReCreate5 years ago
I ordered today Getting Started with Arduino kit from Makershed! Can't wait it to come all the way to Finland!!
ReCreate Jodex5 years ago
Wow Finland? I'm gonna get mine soon...eventually XD
Jodex ReCreate5 years ago
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
ReCreate Jodex5 years ago
i got mine now! :D Did you?
Jodex ReCreate5 years ago
About four (five) weeks ago... :)
ReCreate Jodex5 years ago
Ah :D Last month?
Jodex ReCreate5 years ago
Yes
ReCreate Jodex5 years ago
What have you done with it so far?
Jodex ReCreate5 years ago
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.
ReCreate Jodex5 years ago
The blinking LED, Getting readings from potentiometers, And even a siren!(based on melody code) Would you like the siren code?
Here
ReCreate Jodex5 years ago
Yeah, Where did you buy yours from?(also, Is finland near italy?(italy is where arduino's are made))
Jodex ReCreate5 years ago
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...
ijabi3 years ago
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
robot13983 years ago
and i have a arduino uno
robot13983 years ago
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
mcmahanly3 years ago
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?
gunnk (author)  mcmahanly3 years ago
I would recommend you learn a little basic programming first. Look for a tutorial on C as a starting point as the Arduino uses a bit of C and C++ for it's development.

The "int" before the variable names defines what kind of information the variable will store. In the case of "int" it means the value will be an integer. Other common variable types are "float" for floating point (decimal) numbers and "char" for characters. There are quite a few types. The full language reference for the Arduino is here: http://arduino.cc/en/Reference/HomePage
ekhurley3 years ago
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.
DirtMcGurt5 years ago
I'm new to this stuff but wouldn't that be a pull down?
gunnk (author)  DirtMcGurt5 years ago
Correct. Thanks for the catch on that. I've clarified the text now. Pull-up/Pull-down refers to what happens when the switch is OPEN. A pull-up resistor would hold Digital Pin 2 to 5V. A pull-down resistor holds it to 0 when the switch is open. We're holding to 0V when the switch is open, so this is a pull-down resistor.
etni3s5 years ago
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.
IMG_3409.jpgIMG_3406.jpgIMG_3407.jpg
gunnk (author)  etni3s5 years ago
The code definitely looks much cleaner!
etni3s etni3s5 years ago
(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.)
1-40 of 66Next »