An error occurred while uploading the sketch

Why this happened Sketch uses 6600 bytes (20%) of program storage space. Maximum is 32256 bytes.
Global variables use 293 bytes (14%) of dynamic memory, leaving 1755 bytes for local variables. Maximum is 2048 bytes.

This tells you that the sketch consumes only a small part of the memory capacity of the board, so it's all good. Proceed with uploading the sketch and see if it works.

My uploading appear error?

An error occurred while uploading the sketch--->this is the error

What you posted in #1 is not an error.

Because I try several times.After completed uploading and error appear.

Show the error. If it is the output window/pane of the IDE, copy it and paste it here in a new reply using code tags.

Which board are you compiling for? How do you upload (via USB or via ICSP).

So does the upload complete, or does an error appear? And if an error appears, what is it? Again (third time), the information in post #1 is not an error. It's basically a message that tells you that the sketch compiled OK and that it will fit in the Arduino's memory.

Settled problem

So maybe you can give a good description of the problem and how you solved it; it will help others.

Try to load and run Hello World on Arduino Leonardo ETH.
Found that for the Leonardo boards you need to wait for the serial port connect.
So I added this...
void setup() {
// put your setup code here, to run once:
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);

// wait for serial port to connect. Needed for native USB port only:
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}

// print a message to the Serial Monitor:
Serial.println("Hello, world3");
}

void loop() {
// put your main code here, to run repeatedly:

}

@leonmcd , that does not help with upload problems.

Please edit your post, select all code and click the <CODE/> button to apply code tags and next save your post.

Code tags make that your code is easier to read and easier to copy and the forum software will display it correctly. See How to get the best out of this forum.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.