Arduino IDE-How to Write Program on the Arduino Board

This article details how to write programs to an Arduino board with the Arduino IDE.

TOC

Preparation for Program Writing

1
Arduino board PC USB cable

Connect the Arduino board(Arduino Uno) to the PC using the Arduino IDE with a USB cable.

2
Arduino IDE Start

Start the Arduino IDE.

3
Arduino IDE Select Ardino board

Select the Arduino board for writing the program. so select "Arduino Uno".
(The port is automatically selected.)

4

Create a simple program for writing.

Arduino IDE Program to blink LED at 1 second intervals
void setup() {
  pinMode(13, OUTPUT);//Set pin 13 as OUTPUT
}

void loop() {
  digitalWrite(13, HIGH);//Turn on the 13-pin LED
  delay(1000);//Wait 1000msec (1sec)
  digitalWrite(13, LOW);//Turn off the 13-pin LED
  delay(1000);//Wait 1000msec (1sec)
}

Copy and paste the above program into the edit area of the Arduino IDE.

5
Arduino IDE verify

After the program is complete, click "Verify".

6
Arduino IDE compilation complete

If the program is correct, compilation is complete. This completes the preparation to write the program.

7
Arduino IDE file save

After compilation is complete, save the program. so click "File-Save"

8
Arduino IDE file name save

Enter "File Name" and click "Save".

Program Writing

1
Arduino IDE upload

Click "Upload" for writing the program to the Arduino board.

2
Arduino IDE done uploading

If the program writes without any problems, the message "Done uploading." is displayed and the LED on the Arduino Uno blinks at one-second intervals.

3

Each time you change the program on the Arduino board, you must write the program to the Arduino board.

Arduino IDE change program verify

For example, change the program from "delay(1000);" to "delay(100);" as shown above and click "Verify".

4
Arduino IDE upload LED blinks at 0.1 second intervals

After modifying the program, click "Upload". Now the LED on the Arduino Uno will blink at 0.1 second intervals.

Let's share this post !
TOC