Blink- Your First Arduino Project

by Mr.Monkey16 in Circuits > Arduino

39622 Views, 17 Favorites, 0 Comments

Blink- Your First Arduino Project

images.jpeg
Blink is a great first project for Arduino beginners. It is so simple you can do it in ten minutes with this instructable. 

Materials

IMG_1171.JPG
Arduino
LED
Arduino Cable

(optional) Two AA batteries

Attach Arduino to Computer

IMG_1172.jpg
Pretty self explanatory...

Upload Sketch to Arduino

Screen Shot 2012-10-14 at 6.29.29 PM.png
Screen Shot 2012-10-14 at 6.31.40 PM.png
Open the Arduino sketch drawing program thingy (You can download it from the Arduino website). Copy and paste this code-

/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.

  This example code is in the public domain.
*/

// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
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
}

-to the Arduino
I did not make this code /i got it on the Arduino website

Plug Your LED In

IMG_1174.JPG
Put the positive terminal of the LED in pin 13 and the negative terminal to GND. Your LED should start blinking away! Congratulate yourself with some snacks.

External Battery Power

IMG_1175.JPG
If you want to power your Arduino using battery power just plug the Negative wire into Ground in the Power section of the Arduino and the Positive one to 5V. Your LED should start blinking if you uploaded the sketch correctly.

Sorry it's crooked I'm to lazy for retakes.

Other Stuff...

Screen Shot 2012-10-14 at 6.30.25 PM.png
IMG_1176.JPG
These are the icons that you will see when your writing a sketch.The checkmark means Verify. Click this if you want to know if your sketch isn't totally messed up. The next icon means Upload. The third one is to start a new sketch and the fourth and fifth are Open and Save Sketch.


It is nice to put rubber or felt "legs" on your Arduino. This just doesn't mess up the Arduino or scratch the surface the Arduino is on.