You are on page 1of 2

Project:

Arduino IDE install, and Blink Program

Description: Set up the software for the Arduino IDE and write a program that blinks the LED embedded
in the Arduino Uno board.

Supplies:

• Arduino Uno
• Arduino Uno USB cable

Constructs:

• Statements

Steps to install IDE (only for personal computers):

• Download the Arduino IDE from https://www.arduino.cc/en/Main/Software Note that you do


not need to donate in order to download the IDE.
• Run the installer
• On Windows machines it will give you a list of install options, make sure that you install the USB
driver, the Arduino software, and associate .ino files.


Program description:

• Write a program that blinks the embedded LED located on digital pin 13 on the board every
second.
• In the setup() function, you will need to set pin 13 to output using the pinMode function.
• In the loop() function, you will need to do the following steps:
o turn the LED on (using digitalWrite)
o wait for a second (using delay)
o turn the LED off
o wait for another second
• To run the program, first click the check mark in the upper left hand corner to make sure that
the code compiles. (Alternatively, you can use the menu and choose Sketch → Verify/Compile)
• Next, if the code compiles, click the arrow to upload the code. (or use the menu to choose
Sketch → Upload)
• If your code compiles, but does not upload to the board there could be one of several issues:
o Go to the menu and choose Tools → Board and select Arduino Uno.
o Select a different serial port by going to Tools → Port and selecting the port associated
with the Arduino Uno.
o Unplug and re-plug in the Arduino

The code for the blink program is below. You can either add this code into your Arduino IDE, or you can
copy-and-paste from the website.


/*
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:
const 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
}

You might also like