Introduction: Introduction to Arduino

This instructable is a great way to start off arduino. I will show you how to flash an led this is considered the 'Hello World' for arduino.

Step 1: Which Arduino

Which arduino should I use? I believe that you should use an arduino uno or mega. This is because they are the most popular and most used.

Step 2: Setup

I suggest getting a breadboard as they make electronics so much easier. First connect the longer lead of the led or anode lead to pin 13. and the shorter lead or cathode to ground. The reason we use pin 13 for the led is because pin 13 has a built in resistor so the led will not burn out.

Step 3: Connections to Arduino

First get a usb cable and plug one end into the arduino and the other into the computer. Then load up the Arduino IDE.

Step 4: Code

Coding is probably the hardest and most intimidating part of arduino. You do not have to follow the coding part and write it all down, as there is an example in the arduino IDE.

All the code:
int led = 13;

// the setup routine runs once when you press reset:
void setup() {               
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);    

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second

NOTE: you can paste this right into the IDE.

Step 5: Explanation

13 is the pin the anode lead of the led is in. High is voltage on and Low is voltage off. The delay (1000) is one second.
The arduino is told that put the led on high, wait for a second then put the led on low and wait for a second.
NOTE: the led will automatically repeat as the arduino is set in a loop. Credit to Sparkfun electronics and Randofo for the great images!


Lectric Wizard (author)2012-10-14

randofo (author)2012-08-15

Please credit your images, particularly the one your borrowed from me.

Harry Park (author)randofo2012-08-16

Randofo, I will credit my images sorry about that, though I did not use the images or any image off you only sparkfun. I also love your instuctables that is where I got my inspiration from!

Harry Park (author)Harry Park2012-08-16

Sorry Randofo I realise which image I used I will credit you.

GarageGuru (author)2012-08-15

Sweet! Thanks for making an Introduction 'ible for Arduino that is very simple for beginners like me.

Harry Park (author)GarageGuru2012-08-16

No problem I try to keep them coming.

About This Instructable




More by Harry Park:DJ Synthesizer Made in Google sketchup3D Printer DIY FREE PLANSPlane made in Sketchup
Add instructable to: