I was working with an arduino mega, when i tried to upload a new sketch but i was impossible due to this error. I have read a lot and it seems like this is a pretty common mistake, but any solution solved the problem in my case. I tried reburning bootloader. My usb cable its working fine since it uploads sketches correctly into my arduino uno. I tried uploading sketch using arduino as isp and the same error. I tried pressing reset button while uploading, betwen compilind and uploading and in all possible time combinations. I don't know what to do to save my mega.
Here's the output:
Arduino:1.8.9 (Windows 10), Tarjeta:"Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"
El Sketch usa 6376 bytes (2%) del espacio de almacenamiento de programa. El máximo es 253952 bytes.
Las variables Globales usan 190 bytes (2%) de la memoria dinámica, dejando 8002 bytes para las variables locales. El máximo es 8192 bytes.
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
Ha ocurrido un error mientras se enviaba el sketch
Este informe podría contener más información con
"Mostrar salida detallada durante la compilación"
opción habilitada en Archivo -> Preferencias.
I don't remember exactly, but something saying that the bootloader was burned succesfully, the same message that i got when i burned bootloader to a chinese arduino nano. I think that there is no issue burning bootloader.
I have also tried to uptade software and drivers, but nothing seems to work.
Make sure you have selected the port of your Arduino board from the Tools > Port menu.
Sometimes the port will be labeled with the board name in the menu. Other times it will not. If you don’t know which port is your Arduino, you can find it like this:
Unplug your Arduino board from the computer.
Tools > Port
Note the ports, if any, listed in the menu.
Close the Tools menu
Plug your Arduino board into the computer.
Tools > Port - The new port listed in the menu is your Arduino board.
Hi to everyone,
I have the same problem since about one week. I started a project 3 weeks ago and could flash my 2 Megas 2560 without any problem. The I rebooted my laptop and since this moment I have problems. I tried a lot of solutions from the internet but nothing works for me. All other hardware works (Uno, Nano...)
Strangely the following example works everytime:
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT); //Serial.println("Initializing...!!!!");
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
and this one never
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
Serial.begin(9600);
pinMode(LED_BUILTIN, OUTPUT);
Serial.println("Initializing...!!!!");
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Very old versions of the Mega bootloader want into a debug mode when !!! is in one of the strings in the program. The new version of the Mega bootloader does not have this problem.
Which USB to TTL serial chip is used on your Mega? This is the black chip near the USB jack. The most common ones are marked either "MEGA16U2" or "CH340".
Yes. You will need an ISP programmer to burn the bootloader. If you don't own a dedicated ISP programmer, you can use a spare Arduino board as an "Arduino as ISP" programmer: