How to Program an Arduino Uno to Blink

by Shivain Vij in Circuits > Arduino

1191 Views, 14 Favorites, 0 Comments

How to Program an Arduino Uno to Blink

Arduino_Uno_-_R3.jpg

In this instructable, I will be teaching you how to program and Arduino Uno to blink. This project is not very advanced and is great for beginners.

Components

1kohm-resistor.png

-Arduino Uno

-LED Lights (optional)

-Resistors (doesn't have to be the same as shown in the picture)

-Breadboard (optional)

-Bullet connectors (optional)

Put It Together

ExampleCircuit_bb.png

Connect the led to the GND point and the 13 point. (use the resistor to connect point 13 to the led!)

The picture was courtesy of Arduino.

Program It!

Type the following program into the Arduino program:

int led = 13;

void setup() {

pinMode(led,OUTPUT)'

Serial.begin(115200);

}

void loop() {

Serial.printIn("Setting LED to HIGH");

digitalWrite(led, HIGH);

delay (500);

Serial.printIn("Setting LED to LOW");

digitalWrite(led, LOW);

delay(500);

}

Upload It!

Now upload it and see if it works. If the program doesn't work, or the board doesn't accept the program, go back and make sure you typed in the code correctly.