Introduction
Uploading a sketch sends your program to the Arduino board so it can run your instructions.
Jump into concepts and practice - no test required
Uploading a sketch sends your program to the Arduino board so it can run your instructions.
1. Connect your Arduino board to your computer with a USB cable. 2. Open the Arduino IDE and write or open your sketch (program). 3. Select the correct board type from Tools > Board. 4. Select the correct port from Tools > Port. 5. Click the Upload button (right arrow icon) or press Ctrl+U. 6. Wait for the IDE to compile and upload the sketch. 7. The Arduino will reset and start running your sketch automatically.
You must select the right board and port for the upload to work.
The sketch runs automatically after uploading; no extra steps needed.
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}// Select board: Arduino Uno // Select port: COM3 (Windows) or /dev/ttyACM0 (Linux/Mac) // Click Upload button in Arduino IDE
This program makes the built-in LED blink on and off every half second after uploading.
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH);
delay(500);
digitalWrite(13, LOW);
delay(500);
}If upload fails, check your USB cable and port selection.
Make sure no other program is using the same port.
After upload, the Arduino resets and runs the new sketch automatically.
Uploading sends your program to the Arduino board.
Select the correct board and port before uploading.
The sketch runs automatically after upload finishes.
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}