My son and I are trying to get the EvilMadScientist Peggy board working. It's got an Arduino Mega2560 on it. We programmed it successfully a few months ago, and it's still running the program we put into it (e.g., the chip and the board all function just fine).
Whenever we try to upload a new program (our Peggy program, blink, anything...) we get the message:
avrdude: stk500v2_getsync(): timeout communicating with programmer
This repeats a few times then it times out.
I have a Mac (OSX 10.10.5), my son has a PC with Windows 10. But we've also tried this with a Mac with OSX 10.9.5.
We've also tried to upload a simple blink program to a Sainsmart Mega2560 board. Same problem, same error message every time!
There are lots of solutions out there, including
- Editing boards.txt to change the AVR (some say to change it to -wiring, some say to use -stk500v2).
- Pressing the reset button just before trying to upload the program
- Unplugging the board, then plugging it in right before uploading.
- Using AVR ISP instead of AVRISP MKII
- Searching for and removing triple !!! in the code.
None of those worked for us.
We have the same problem with a Arduino Duemilanova. But we are able to upload programs to an Arduino Nano and Arduino Uno with no problem.
Has anyone solved this?
Many thanks!
Comments
You have said that you are trying to get a Peggy board working, but that you're using an Arduino Mega2560 on it. The Peggy boards do not come with an Arduino Mega2560, nor a socket for one, nor any other obvious way to attach one to it. So, it is not whatsoever clear what your actual hardware setup is.
You are having a problem with uploading code to the '2560 board. However, you have not said how you are trying to upload the code. The fact that you are mentioning the AVR ISP and AVRISP MKII leads me to guess that you are using an external programmer (perhaps an AVR ISP programmer of some sort?), rather than direct uploads via the more standard USB/bootloader interface, but you have not said. It is not clear what hardware you are using to connect the Mega2560 to your computer. The fact that you mention "boards.txt" suggests that you are trying to upload from within Arduino, rather than directly from the command line... but you have not said so directly. Assuming that you are trying to upload from within Arduino, then please follow the steps of the Arduino troubleshooting guide. I would also suggest starting over with a fresh copy of the Arduino IDE, one where you have _not_ edited the boards.txt file. If you are not using Arduino (and you are programming from the command line or another program), then you should ignore the boards.txt file. The fact that you can upload to both an Arduino Nano and Uno suggests that your computer and basic programming methods are sound. If you are using the USB interface to program these from within Arduino (guessing here-- again, you haven't really indicated what your hardware, programming, or software setups are!) then that does suggest that your USB drivers are working properly. If you find the same sort of behavior (these two boards always work, these two boards never work, etc) across multiple computers, that may indicate that the boards that the boards (or at least, the part of the hardware that allows them to be programmed) may be damaged.