Issue with getting started with Arduino mega - arduino

I've just got my first brand new Arduino mega 2560 board. I've downloaded Arduino 1.0.1 software.
When I first plugged in the board, it failed to detect the device. So I opened device manager and pointed to the "...\arduino-1.0.1\drivers" folder to update the driver for the unidentified Arduino Mega 2560 device.
Now comes my first problem; (O/S is window 7 32bit)
Following warning came.
I chose to install anyway. Is that wrong??
However driver is successfully installed.
Then I opened Arduino 1.0.1 software (what should i call it, IDE?) and opened the blink example. And tried to upload it to the board. I didn't change any settings. Kept the default settings, which are;
Board = Arduino Mega 2560 or Mega ADK
Serial Port = COM3
Upload failed giving following error,
Binary sketch size: 1,632 bytes (of a 258,048 byte maximum)
avrdude: stk500v2_command(): unknown status 0xc8
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude: stk500v2_command(): unknown status 0x01
avrdude: stk500v2_disable(): failed to leave programming mode
How can I get over with this? I don't have any prior experience on Arduino. Can't figure out what to do now.
It would be greatly appreciated if someone can help me to overcome this issue. If the details I provided are not enough, please ask. Hope someone will come to help soon..
Thank you!

The same problem with possible solution is described here:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?action=print;num=1287724404

Related

Error: avrdude: stk500_getsync() attempt X of 10: not in sync: resp=

I am using an Arduino Uno and every time I upload the code I get this error:
Error: avrdude: stk500_getsync() attempt X of 10: not in sync: resp=
I have lookad at every single possible option; first of all, the Arduino is not damaged; I made sure. I did the following :
checked the port
tried the following programmers: ArduinoISP, AVRISP, AVRISPmkll
tried changing the board from the toolbar, tried Arduino Uno, Arduino Mega, etc.
tried more than one USB cable
tried on 2 PCs
tried installing different versions of Arduino
tried to press on burn bootloader option in the toolbar (that I didn't know what it could do exactly)
restart pc, restart Arduino IDE, reset Arduino, reset Arduino when RX led lights up.
I am a newbie with Arduino, so I would be grateful if you could explain in detail, and please don't ignore because this problem is going to drive me crazy and I don't know anyone that I can consult.
There are custom/forged Arduino boards where the reset is not by default connected to the reset from the (on-board) programmer. You can try pressing upload, and pressing the reset button on the Arduino at the same time (and release it shortly after). If this works, then you can likely find two solder pads close together without a connection between them. Connecting them would re-attach the auto reset (disconnecting them can be useful if you don't want users to be able to reflash your microprocessor). Alternatively, it might be possible that you have bought an Arduino without a bootloader. In that case you will have to upload the bootloader through another Arduino board using ArduinoISP as explained here.

avrdude: stk500_recv():programmer is not responding

I bought a new Arduino Ethernet Shield and connect it to Arduino Uno. When I uploaded my code, I got the error avrdude: stk500_recv():programmer is not responding. Without the Ethernet Shield, it could run succeed. I have tried all the solutions on the Internet. Mac os 10.10.5 and Arduino 1.6.10. The board I chose is Arduino Uno and serial port is dev/cu.usbmodem1421. I have tried to reset and reinstall Arduino IDE,and downloaded FTDI driver. These solutions are not working.
I think you are getting this error because one of these two problems.
Maybe you are trying to upload program while your rx and tx pins are connected with other components.
Or maybe your Arduino is bricked.
For the 1st problem solution is just disconnect wires rx,tx and try to upload the sketch. For 2nd problem use another Arduino to upload program on it(SPI connection). You can follow these steps to resolve your issue written in this article:Programmer is Not Responding Arduino - avrdude: stk500v2_getsync() | Solution

Arduino Uno blinking YL "Programmer is not responding"

Hey guys so I'm pretty new to Arduino and I've been having some trouble with my Uno MC, I decided to pick one up as a little side project in the January sales and only just freed up the time to really start using it.
The first problem is, when I hook up my Uno to my windows 64x PC using a UsbA-B cable (for power) I get a blinking YL on the Uno.
Second problem is, when I attempt to upload an example sketch to the Uno, for instance, "Blink" using the Arduino IDE I get the following error.
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
Have no idea how to fix the issue, but here's some information I know:
My board does show up in Computer Management under my COM3 port as "Arduino Uno" so I believe my drivers aren't the issue here.
I also have the correct board selected in the IDE.
I reinstalled the IDE and reset my computer after installing the drivers, none ofthe errors were fixed.
I've tried holding down the reset button on the Uno (As shown here: https://www.youtube.com/watch?v=plCxXwiUK-w) and that doesn't solve my issue.
Any advice?
Under Tools>Port in the IDE I inexplicably had (COM1) as my active port and not port (COM3) where my Uno actually was.
Program now successfully uploads without errors.
You have to install Boot Loader.To do this you can use a micro controller Programmer such as USBasp and your Arduino software.First insert your atmega328 micro controller on Programmer then use Burn Bootloader in Tools menu of Arduino software then return back your atmega to its location on Arduino.

avrdude: stk500_getsync(): not in sync: resp=0x00

avrdude: stk500_getsync(): not in sync: resp=0x00
I'm using arduino uno with ethernet shield.
I plugged a Led from digital pin to GND directly without any resistor if that was the problem, I do it often so far if that was the cause it just broke down now.
I already did the following:
• Port check
• Board check
• Driver check / re-install
• Cable check / renewed
none of it seems to work. If it is broken would my ethernet shield be harmed and be broken as well? Which should I replace.
Probably you are using Bluetooth. Solution is pretty simple. Just plug off TX and RX cable from Arduino and then upload your code. Then plug them in again.That worked great for me. For more listen this guy.
Try changing your board to Arduino UNO in "Tools" -> "Board" and also check the port =)
I changed Tools->Programmer->AVR ISP and it works now fine :)
You need to upload the Bootloader to solve the issue. This error come only when you have try to upload infinite loop program or boot loader crashed.
You need to upload boot loader using Avr pocket programmer to solve issue
https://www.sparkfun.com/products/9825
Check if the controller is placed oppositely on the board i.e. notched side being opposite of where it should be. That happened to me, gave the same error that couldn't be solved by anything. Just putting this here because the controller doesn't always just stop working if you do that, it might even give this error. Cheers.

avrdude: stk500v2_ReceiveMessage(): timeout

This is the main error that I get when I try to run my ARDUINO program. The full list of errors is as follows:
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
My code is as follows:
int led=13;
void setup()
{
pinMode(13,OUTPUT);
}
void loop()
{
digitalWrite(13,HIGH);
delay(1000);
digitalWrite(13,LOW);
delay(1000);
}
I have tried updating the drivers (they are fully updated) and downloading some programs. I have Windows 7 and my arduino is a MEGA 2560. It shows up in the Device Manager and all of my connections are correct. The green PWR light is on and so is the flashing L light. The RX and TX lights flash when I update. I have tried almost everything on the web. What is the problem?
Another possible reason for this error for the Mega 2560 is if your code has three exclamation marks in a row. Perhaps in a recently added string.
3 bang marks in a row causes the Mega 2560 bootloader to go into Monitor mode from which it can not finish programming.
"!!!" <--- breaks Mega 2560 bootloader.
To fix, unplug the Arduino USB to reset the COM port and then recompile with only two exclamation points or with spaces between or whatever. Then reconnect the Arduino and program as usual.
Yes, this bit me yesterday and today I tracked down the culprit. Here is a link with more information: http://forum.arduino.cc/index.php?topic=132595.0
The error message basically means that the programmer is unable to contact the bootloader on the device; the code you're trying to upload has no bearing on the problem.
What causes this can be numerous and varied, some possible issues:
UART communications
Blinking is happening, so hopefully you aren't using the wrong port. It might be worth checking again though, sometimes USB COM devices install on strange port numbers.
Connect TX to RX (and disconnect them from the AVR if possible) then open a terminal on the COM port, you should see characters echoed if you type them. If you don't, something is wrong up-stream of the chip, it could be the communications chip (I think the Arduino 2560 uses a secondary AVR instead of an FTDI for some reason, so that could be broken, either its software or hardware)
ATmega* bootloader
The AVR is not executing the bootloader for some reason. If the programmer is not resetting the micro before attempting to connect, this might be the reason. Try to reset the AVR (press and release the button) while the programmer is attempting to connect. Sometimes software that runs in a tight loop will prevent the bootloader from connecting.
Barring that, the fuses might have gotten messed up or the code erased. You would need to reflash the bootloader and proper fuses, again, see the appropriate info page for your device.
Arduino Mega 2560 only: ATmega8U/16U software
Might not be working and would need reprogramming. See the Programming section on the info page, you will need the firmware and Atmel-compatible DFU (device firmware update) software on your computer to reflash the target.
Hardware damage to the board, AVR(s), or FTDI chip
You're hosed; need a new chip.
Check this forum post for some more ideas.
I got this error because I didn't specify the correct programmer in the avrdude command line. You have to specify "-c arduino" if you are using an Arduino board.
This example command reads the status of the hfuse:
avrdude -c arduino -P /dev/ttyACM0 -p atmega328p -U hfuse:r:-:h
To my humble understanding, this error arises in different scenarios:
you have selected the wrong port or you haven't at all. go to tools > ports and select the com port with your Arduino connected to.
you have selected the wrong board. go to tools > board and look for the right board.
Do you have one of these Arduino replicas or you don't have the boot-loader installed on the microcontroller? I don't know the solution to this! if you know please edit my post and add the instructions.
(windows only) you don't have the right drivers installed. you need to update them manually.
sometimes when you have wires connected to the board this happens. you need to separate the board from any breadboard or wires you have installed and try uploading again. It seems pins 0 (RX) and 1 (TX), which can be used for serial communication, are problematic and better to be free while uploading the code.
Sometimes it happens randomly for no specific reason!
There are all kinds of solutions all over the internet, but sometimes hard to tell the difference between magic! Maybe the Arduino team should think of better compiler errors to help users differentiate between these different causes.
The same problem happened to me and none of the solutions above worked. What happened was that I was using an Arduino UNO and everything was fine, but when I bought an Arduino Mega 2560, no matter what sketch I tried to upload I got the error:
avrdude: stk500v2_ReceiveMessage(): timeout
And it was just on one of my windows computers and the other one was just ok out of the box.
Solution:
What solved my problem was to go to tools > boards > Boards Manager... and then on the top left of the opened windows select updatable in the Type section. Then select the items in the list and press update on the right.
I'm not sure if this will solve everyone's problem, but it at least solved mine.
Open Terminal and type:
$ sudo usermod -a -G dialout
(This command is optional)
$ **sudo chmod a+rw /dev/ttyACM0**
(This command must succeed)
This isn't really a fixing solution but it may help others. Unlike Nick had said for me it was due to code in my program. I have the mega ADK model. The issue was tied to a switch statement for processing and parsing the returned byte[] from the usb connection to the Android. Its very strange because it would compile perfectly every time but would fail as the OP had stated. I commented it out and it worked fine.
I was running this code from Arduino setup , got same error resolve after changing
serial port to COM13
GO TO Option
tool>> serial port>> COM132
If you use the ino command line:
ino upload
it can be because you use the arduino software at the same time, try to kill it.
I've connected to USB port directly in my laptop and timeout issue has been resolved.
Previously tried by port replicator, but it did not even recognized arduino, thus I chosen wrong port - resulting in timeout message.
So make sure that it is visible by your OS.
Ensure the serial monitor is not running and nothing is reading/writing dev/tty/S0 (or whichever port you're using), which may cause uploading interference.
I had the same problem, and in my case, the solution was updating the usb-serial driver using windows update on windows 10 device's manager. There was no need to download a especific driver, I just let windows update find a suitable driver.
I faced same problem. but Root cause of issue. Incorrect communication was set and thats why I occurred Communication timeout.
Solution: If you connected to laptop through USB port.
Change Port as USB. Please follow steps
Open Arduino-IDE
Go to Menu "Tools --> Port" and Select option "USB" { for me its showing as /dev/ttyUSB0 }
It working fine for me.
Something not yet mentioned is that this message also appears when the baudrate is not properly set... for Arduino, it is generally 115200.
My aurdino mega 2560 returned same error. It seems the problem exists in unofficial clones. The issue solved by pressing reset button just before uploading starts, as advertised in following video.
https://www.youtube.com/watch?v=tAzjO4v7oF4&list=LLDn5ewJDzz53IiwWmZTgQnQ&index=1

Resources