Mega/ESP8266 upload error exit status 1

i want to ask, this is my first time using arduino, my arduino is mega 2560 with wifi esp 8266. when i want to try my first upload, i got error exit status 1. i already tried all of the comments before and still not work. does my board get fried because of bad grounding of my house?

can u guys help me

Sketch uses 1518 bytes (0%) of program storage space. Maximum is 253952 bytes.
Global variables use 13 bytes (0%) of dynamic memory, leaving 8179 bytes for local variables. Maximum is 8192 bytes.
"C:\Users\fathan\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\fathan\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega2560 -cwiring "-PCOM9" -b115200 -D "-Uflash:w:C:\Users\fathan\AppData\Local\Temp\arduino\sketches\2A8DAC810C8CCFC04E6AB2EA711CBF47/sketch_mega_pertama.ino.hex:i"

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\fathan\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM9
         Using Programmer              : wiring
         Overriding Baud Rate          : 115200
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

avrdude done.  Thank you.

Failed uploading: uploading error: exit status 1

Hello @tenggggg

I've split your question from the original topic because the original did not involve a Mega.

Is this a board with the integrated ESP8266? If yes, did you verify that all dip switches are set correctly?

i havent touched yet any of the switches or anything, just got it from the package and plugged it to my computer and make a clock program.

maybe you have a refrence for the tutorial setting it up before doing code on the ide?

Please provide a link to the product listing of the board you purchased. That will give us the context we need to provide you with the appropriate information regarding how to set up the board for uploading a sketch.

image

this is my arduino, Arduino Mega 2560 R3 + ESP8266 Wifi.

The little "DIP switches" on the board are used to make electrical connections between the following things:

  • The UART pins on the ATmega2560 and the ESP8266 chip
  • The CH340 chip (provides the USB interface with the computer) and the UART pins on the ATmega2560
  • The CH340 chip and the UART pins on the ESP8266

You must make sure that the switches are configured so that the ATmega2560 UART is only connected to the CH340 before uploading so that the computer can communicate with the ATmega2560, and so that the ESP8266 doesn't interfere with the upload.

Switch pins 3 and 4 to the on position and all other pins to the off position to connect the ATmega2560 to the CH340. Then try uploading again.


You can learn more about the switches from the manual available for download from the "DOWNLOADS" tab of the product page here:

https://www.jaycar.com.au/duinotech-mega-2560-r3-main-board-with-wi-fi/p/XC4421

thanks, maybe just to make sure. what does the serial dip switch do?

Are you referring to this switch?:

image

If so, it is explained in the manual I linked to in my previous reply:

Serial Selector: In addition to this, the XC4421 ATMEGA board has an additional slide switch which will configure whether to use
Serial0 or Serial3 for communication to the ESP8266. This is handy when you want to configure back and forth communication
between the PC, Arduino, and ESP all at once.

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