173

I have an Arduino Duemilanove with an ATmega328. I am working on Ubuntu 12.04 (Precise Pangolin), and the Arduino IDE's version is 1.0. Recently, I tried to upload a few of the sample sketches onto it, such as the Blink one. However, none of my attempts are working and they result in the same error every time I try it:

avrdude: stk500_recv(): programmer is not responding.

I have enabled /dev/ttyUSB0 under menu ToolsSerial Port. I have also selected the correct board (Duemilanove with ATmega328) from the list. Yet, I am not able to resolve the issue. I have searched online as well and none of the other responses for this problem seem to be working for me. Why I am encountering this issue and how to resolve it?

I also tried turning the onboard ATmega and fitting it in the other direction. Now, I encounter no problems uploading, but nothing happens afterwards. The onboard LED also does not seem to be blinking.

2
  • Disconnect RST from GND on the Arduino uno board. I followed this tutorial and forgot to UNDO that.
    – ArtiomLK
    Commented Oct 23, 2018 at 5:51
  • This could be because the baud rate is set to a wrong (probably too high) value. Commented Mar 9, 2019 at 22:39

40 Answers 40

136

I had the same problem – this is why I found this Question.

I only had to change the Processor from “ATmega328P” to “ATmega328P (Old Bootloader)”

Problem solved – at least for me.

enter image description here

9
  • Hey, Where can I find the Processor selection panel in the new IDE? Commented Jul 22, 2018 at 14:13
  • Bless you, that was my issue too.
    – ofekp
    Commented Nov 24, 2018 at 13:49
  • 2
    This problem might show up if you you're using the ELEGOO NANO board. The same solution is mentioned in the FAQ document also.
    – kchetan
    Commented Nov 24, 2018 at 18:51
  • 1
    If the board is an Arduino nano and was manufactured previously to Jan 2018 just selecting Processor > "ATmega328P (Old Bootloader)" will do the trick (arduino.cc/en/Guide/ArduinoNano#toc4)
    – Bit-Man
    Commented Aug 6, 2019 at 20:51
  • 1
    Your suggestion solved the same problem with my OSX + Arduino Nano
    – maestr0
    Commented Jul 3, 2020 at 2:46
122

I had this problem with a Crowduino, running the Arduino IDE on OS X. The solution for me was to switch on verbose output during upload (in the Arduino IDE preferences pane).

Then, when uploading, you can see AVRDUDE sending three packets avrdude: Send: 0 [30] [20] (with corresponding RX flashes on the board) right before the avrdude: ser_recv(): programmer is not responding error.

The trick is to hit the reset button on the board immediately before these three packets are sent. Then the program will be uploaded successfully.

13
  • 3
    Well, that solved the problem for me at least. How did you figure it out? Commented Jan 12, 2014 at 18:06
  • 8
    @daniele Other people noticed that if you reset after X seconds, then it works. I figured the packets were some attempt at a hand-shake. So basically, I solved it using Google, patience and futzing around with the board!
    – hoipolloi
    Commented Jan 12, 2014 at 18:16
  • 5
    FYI - I had to install the latest FTDI drivers in order to resolve this issue permanently Commented Jun 22, 2014 at 17:50
  • 2
    Updating FTDI driver and restarting Arduion helped me (MacOS 10.9.4, Arduino Nano 328)
    – peetonn
    Commented Aug 17, 2014 at 7:43
  • 1
    I spent so much time trying to fix this, including trying reset before, but following these exact instructions and putting it in verbose mode fixed it on the first try! Awesome, thanks so much!
    – Foxichu
    Commented Sep 21, 2014 at 23:29
96

Make sure that there is no input on the Tx/Rx pins. Then it will work.

5
  • 2
    This worked for me! I had a bluetooth module connected to the RX/TX pins.
    – johngreen
    Commented Apr 12, 2017 at 15:16
  • This worked for me. I had to unplug also the usb cable and restart arduino, because I received another error after unplugging the pins (and the power, just to be sure) Commented Sep 6, 2017 at 15:55
  • Yeah, I was pulling pin 0 on my Uno to ground, which caused the problem Commented Nov 22, 2020 at 23:24
  • This worked for me as well, Thanks. I had connected the hc 05 before uploading the code sketch and so faced this problem. Also ,earlier i faced similar error when i had not selected arduino uno from tools -> board Commented Dec 1, 2020 at 9:14
  • Why was this an issue though? It did not know if it had to act as an intermediate to flash a sketch to say the TX/RX module or the actual arduino?
    – Ari
    Commented Jan 30, 2022 at 14:58
54

There is some voodoo-talk in the answers around here among good ideas. Let's try to be a bit more real about what's happening and sum up the good stuff to check:

Basically, when that happens, it is a good idea to enable verbose mode for AVRDUDE, to get a better idea of what's happening. To do so, you only need to go in the preferences and check the verbose mode box. It's also a good idea to move away from the Arduino IDE, and launch a console to be more comfortable on reading AVRDUDE's output, that you'll get on clicking on the upload button.

What's important here to put 3 or 4 -v to the command call. Here's how looks like such AVRDUDE commands, with made up parameters as they are totally dependent on how the Arduino has been installed:

avrdude -v -v -v -v -C /path/to/avrdude.conf -patmega328 -P/dev/usbport -U flash:w:/path/to/firmware.hex

A good way to get the correct command line to use is to copy it from the verbose output of the Arduino IDE output log when verbosity has been enabled.

When you get avrdude: stk500_recv(): programmer is not responding, it basically means that something wrong is happening, before the flashing actually begins.

Basically you have to check (from hardware to software, low level to high level):

  • if the cable and/or connectors does not have microcuts;
  • if no solder points are short circuiting (i.e. touching something metallic around), that means:
    • if there is no short circuit on the PCB between Rx and Tx (usually pins 1 and 0);
    • if there is no contact with a metallic element below the board, or tiny bits between a component's legs (like the FTDI, the ATmega chip or any other);
  • if the ATmega chip is not out of power (GND/VCC shortcut or cut or VCC input being dead…);
  • if the 1 and 0 pins of the Arduino are not being used by some shield or custom design (/!\ does not apply to the Leonardo as it has independent USB handling);
  • if the USB to UART converter does not have a problem (FTDI on older Duemilanove or ATmega16U2 on newer Arduino Unos);
  • if the ATmega328 chip is fried or wrongly installed;
  • if the bootloader has been overwritten or is failing;
  • if the right baudrate is applied for entering the bootloader;
  • if the right settings are set for the target microcontroller and Board;

Usually the avrdude -v -v -v -v can help a lot find at which stage it is failing. Whether it can't make a USB connection at all (cable failing, USB/UART, PCB…), or it is a bootloader problem.

Update: I tried turning the onboard ATmega and fitting it in the other direction. Now, I encounter no problems uploading, but nothing happens afterwards. The onboard LED also does not seem to be blinking.

I'm afraid that if you reversed the position of the ATmega, and then it does not work, the fact that you placed the power source on digital pins may have burnt your chip.

7
  • BTW, the Arduino output has as last line (before starting uploading) the path to avrdude, the path to the config and path to the flash file. This can easily be copy pasted into the command line and the -v's be added.
    – powtac
    Commented Mar 25, 2015 at 19:33
  • Indeed, though, iirc (I'm almost never using the awful UI), you have to enable verbose output in preferences
    – zmo
    Commented Mar 25, 2015 at 21:49
  • 2
    For me this happened because I set an incorrect baud rate in the eclipse avrdude config. Figured it out when I saw the commandline on arduino IDE.
    – Tejas Kale
    Commented Jun 8, 2015 at 14:02
  • avrdude: no programmer has been specified on the command line or the config file Specify a programmer using the -c option and try again
    – basickarl
    Commented Aug 14, 2017 at 21:45
  • 1
    Quite right. My problem was connecting the Arduino using a USB hub. Connecting directly to the computer's USB port solved the issue. Commented Jan 12 at 17:27
24

Try to see if your board was selected correctly. Click on menu Tools --> Board and check if the correct board is select.

4
  • 2
    This was it for me. I was using an Uno until I fried it and got a new Mega. The brand new Mega was seeing this problem. I didn't even know this menu existed. Thanks!
    – Mike
    Commented Feb 15, 2014 at 1:02
  • Not that, but the correct serial was not selected... Something to think about, indeed! Thanks! Commented Mar 12, 2016 at 23:32
  • how do I know which board is compatible with my Arduino?
    – C.Unbay
    Commented Nov 24, 2017 at 13:28
  • This worked. I am switching from an Uno to a Nano Every. First I had to download a new library. Then I had to select the right board (via this answer), then the right "Registers emulation" (found right below Tools > Board)
    – Charity
    Commented Nov 24, 2020 at 19:58
14

You can check if you have any jumper wires plugged into pin 0 and 1. Those pins are used for serial communication and plugged wires can prevent the code from being uploaded on the board.

If nothing is plugged, it might be a bug with AVRDUDE, you can try updating it.

4
  • 3
    There is absolutely nothing connected to 0 and 1. avrdude is also updated and is the latest version. Commented Nov 4, 2013 at 10:20
  • I don't have another board. :( Though a similar error seems to be occurring on Windows, so it may be a problem with the board. Commented Nov 4, 2013 at 13:18
  • Yep that's what I would say... You can try a Serial.println() exemple to check if it's not just the led 13.
    – ladislas
    Commented Nov 4, 2013 at 13:22
  • Thank you! I completely forgot the jumpers Commented Apr 14, 2022 at 20:59
10

I met this issue too, and I resolved it by re-installing USB serial driver. Pls see also:http://arduino.cc/en/Guide/Howto and http://www.ftdichip.com/Drivers/VCP.htm

2
  • 1
    Whenever I use my Arduino Duemilanove ATMega328, I always forget to do this, and also check that the correct Board is selected in the Arduino app (under Tools as of 1.0.6.
    – Andrew
    Commented Oct 15, 2014 at 0:07
  • 1
    If you just installed the arduino IDE, then this answer is (most likely) what you're looking for!
    – Zaxter
    Commented Jan 7, 2015 at 12:57
7

Above error comes in 3 stages

  1. If boot loader has been crashed
  2. if you not selected proper port and proper board from IDE
  3. If you communicating with other Serial port are connected.I.e GND and Tx pin are connected to other communicating device
1
  • In my case, I had selected a wrong board. Thank you AMPS! Commented Jul 24, 2017 at 17:30
6

I'm posting this because I didn't find this answer elsewhere. All my Arduino nano chinese (CH340) clones had this problem after upgrading to the Arduino IDE to 1.8.9. What worked for me was to use a spare official Arduino Uno that I have to burn the bootloader on the faulty nanos using the ICSP headers on the nano. For this all I did was to follow the instructions here: chinese-clone-of-arduino-nano-with-chip-ch340g-how-to-fix-it. The ONLY thing I did differently was to always set the "Old Bootloader" option as said before in this thread. Other than that I completely followed the instruction on that link and saved my nanos from that annoying problem. I hope that this helps someone out there.

2
  • This worked for me. I was a bit uncomfortable downloading and installing the exe file from an unfamiliar webpage. But I took in the risk. Hope my computer don't get hacked - most likely it will... sigh.. I will disconnect my Arduino dev PC from internet now. Commented Nov 16, 2021 at 2:09
  • After installing the drivers selection "Old Bootloader" did the trick for me!
    – mayo
    Commented Jan 14, 2022 at 21:20
4

I had the same problem on my first trying of Arduino Uno.

My solution was quite simple. Just plug out then plug in the USB cable.

4

If you are connecting your Arduino through a USB hub, try to connect it directly into one of the USB ports on the Mac instead.
That worked for me.

1
  • Yes, for an Arduino Leonardo, I once had to use an extra current USB port of a D-Link USB hub (model DUB-H7). Connecting the Arduino directly also worked. Commented May 26, 2022 at 9:48
3

I solved the issue on OS X v10.10 (Yosemite) following these instructions:

FTDI chip and OS X 10.10

However the trick proposed by hoipolloi was a working temporary workaround, on this version too.

1
  • This also worked for me on 10.10. Following that post I did not have to do steps 4, 5, or 6. Now I can update scripts using Arduino IDE multiple times without getting that error. Commented Dec 26, 2014 at 3:12
3

On Windows 7, I had this problem multiple times, each time with different error messages. Basically, the IDE is sending to the wrong port.

To fix this, simply go to menu ToolsPorts → [select the COM port that your board is on].

Make sure to double check your board's port:

  1. Start Device Manager

    Start Menu

  2. Make sure your Arduino driver is listed under the port matching your IDE's port settings (mentioned above)

    Device Manager

  3. My board is listed under port COM1. If you want, you can simply change the port in the driver's advanced settings:

    Enter image description here

0
3

Thanks @hoipolloi for the right direction in finding the solution.

Anyway, I had to do a bit different steps to fix the issue.

In my case, the Arduino Uno had worked fine, but it suddenly stopped after some playing with sketches. I was receiving the stk500_recv(): programmer is not responding all the time and nothing worked. Then I paid attention that the LED 13 is always ON on my board. It looked like some hard looped sketch was running over and over on the board and was blocking any input to the board. Not sure, it's just my gues.

I tried clicking the RESET at all the possible moments without any luck and suddenly tried the following steps:

  1. Unplug the board.
  2. Click and hold RESET.
  3. Plug it again.
  4. Wait for a couple of seconds.
  5. Release the RESET button.

After this I noticed the onboard 13 LED turned off for a second and then turned on again. It looked like there were a short reset window when the board is actually being reset. Then as in @hoipolloi's solution I caught the moment of "reset" right before the three packets are sent and that worked.

I hope this will help you to figure out the problem if none of other solutions works.

TIP. If you do not see the three Send: 0 [30] [20] lines when uploading the sketch in your console, do the following:

  1. Click "Upload" in your Arduino IDE.
  2. Look at the log window. You will be able to find a line like this:

    E:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CE:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM3 -b115200 -D -Uflash:w:C:\Users\Sergey\AppData\Local\Temp\build44ca75bc60fd83cc8ef41e35d4d83388.tmp/sketch_sep07a.ino.hex:i
    
  3. Looks like it swallows line break or space symbols like here -CE:\Program Files.... It should be -C E:\Program Files. Copy this like into Notepad, add missing spaces to make the line this:

    E:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -v -v -v -v -C "E:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf" -patmega328p -carduino -PCOM3 -b115200 -D -U flash:w:C:\Users\Sergey\AppData\Local\Temp\build44ca75bc60fd83cc8ef41e35d4d83388.tmp/sketch_sep07a.ino.hex:i
    
  4. Add 4 -v instructions like I did above.

  5. Open the Command Line, paste the command into it and run.

Now you will see much more verbose thanks to 4 -v arguments. Originally, Arduino Studio uses just one.

2
  • Double clicking the reset button might be the necessary trick (on some systems in will enter boot loader for about 8 seconds). Or holding it long enough as described in the answer may or may not have the same effect. Commented May 25, 2022 at 16:33
  • Though it may not apply to the Arduino Duemilanove. Commented May 25, 2022 at 17:28
3

Please do the following checks:

1- No wires in the TX and RX of your arduino while uploading the code.
2- No soldered pins in each others.
3- If 1 and 2 are okey than you must reinstall the bootloader into your arduino using another arduino, you can search how to do that in youtube there plenty of videos talking about it.

2
  • 1
    1- No wires in the TX and RX of your arduino while uploading the code --- worked for me
    – BENN1TH
    Commented Nov 13, 2020 at 21:32
  • Thanks, I had wires on my TX and RX, it worked after I disconnected them Commented Nov 21, 2020 at 9:40
2

I have this problem on my Arduino running on Mac also. It happens on two of my Arduinos (A Arduino Uno and an Arduino Pro connected with FTDI).

For the Uno, I hook the cable up to my computer and press upload, and then start counting until the "TX" LED flashes. Then repeat the upload, but just before the TX LED flashes, hit the reset button, and the upload succeeds.

I later determined that changing the USB cable fixed this issue.

1
  • 1
    Changing the USB cable fixed for me Commented Feb 22, 2015 at 22:36
1

First, ensure that /dev/ttyUSB0 works. E.g. plug in mouse and check it works. Second, try select other board. It is often that non-original boards do not recognized correctly under their names. Third, try press reset button manually while uploading sketch. Probably automatic reset is broken.

1

I solved a problem in my case by downloading and installing old FDTM drivers from here.

Try to install FTDIUSBSerialDriver_10_4_10_5_10_6_10_7.mpkg, then re-start Arduino.

1
  • it's mostly unrelated to the problem of the OP, and the FTDI driver is useful only if you got an Arduino 328.
    – zmo
    Commented Jan 31, 2014 at 23:05
1

Just thought I'd point out that my brand new Arduino Uno Rev3 board uses the following LInux driver:

Device Drivers    
|-USB Drivers
  |-USB Modem (CDC ACM) support

This is known as the: CONFIG_USB_ACM: option in the most recent LInux 3.x kernel.

This device then comes up as: /dev/ttyACM0 or similar.

1

Have you got anything connected to the RESET pin on the Arduino?

I've encountered this issue with a graphic LCD which needed connecting to the RESET Pin. Disconnecting the jumper wire between the LCD and the RESET pin while uploading the code fixed it for me, all you'd have to do then is reconnect once the code has finished uploading.

1
  • This (kind of) fixed my issue. Thanks! Commented Oct 29, 2022 at 12:29
1

I found the cause of this...

Changing my serial port to /dev/tty.usbmodem2131 fixed it. It turns out I was using the wrong serial port this whole time!

0
1

You can try:

  • Check in preferences.txt serial.debug_rate: serial.debug_rate=9600
  • Else try to hit the reset button of your Arduino just when uploading.
  • Else try to select another card in the Arduino IDE menu Tools and then reselect your card in the list.
0
1

This combination of the above answers solved the problem for me:

  • performed the Java update:

    sudo apt-get install default-jdk

  • then killed the Arduino IDE and restarted it

  • my correct board now showed up (Arduino Mega 2560, where before Mega 1280 was only option)

  • for the drivers, I did this:

    sudo chmod a+rw /dev/serial/by-id/usb-Arduino__www.arduino.cc__(a bunch of numbers)

After that, my Arduino IDE shows /dev/ttyACM0 in the tools/serial port menu.

Now, everything works great!

1
  • Thanks! JDK wasn't causing problems in my case, but the sudo chmod a+rw /dev/serial/by-id/usb-Arduino********** did the job. Commented Sep 11, 2015 at 23:30
1

Here is a solution that worked for me running on a MacBook Pro (desktop).

I was getting the same error and it turns out it's because I had the USB connected to a peripheral device (my monitor) rather than a USB on the PC itself. It stopped any errors right away and is a simple solution.

1

I tried to connect my servo to the Arduino 5V pin, but the processor and that is why I got this failure

avrdude: stk500_recv(): programmer is not responding

Solution: buy a new Arduino and external 5 V power supply for the servo.

1
  • Same for me (with a Nano and not a 2009, but still specs are basically identical). Guess what? "Input voltage 7-12V" is a reference to what VIN accepts, not the digital pins. Insofar as the device can still eventually be detected over USB.. I suppose that could just be the FTDI USB-to-TTL converter, somehow having been spared by the hard frying.
    – mirh
    Commented May 1, 2023 at 22:00
0

Did you install/update the driver for the FTDI cable? (Step three on http://arduino.cc/en/Guide/Howto). Running the Arduino IDE from my Raspberry Pi worked fine without explicitly installing the drivers (either they were pre-installed or the Arduino IDE installer took care of it). On my Mac this was not the case and I had to install the cable drivers in addition to the IDE.

0

I just spent the last few hours on this same issue... Just go here "http://www.ftdichip.com/Drivers/VCP.htm", download the latest drivers and reboot. Should work just fine after that. I also downloaded a nightly of the Arduino software, but I don't hunk that made a difference.

0
0

Try to load a program without -b (the baud rate option). In ~/.arduino15/preferences.txt set build.verbose=true, when arduino.cc is not running. In the verbose output you will find the hex file which you should load from a console:

avrdude -v -v -v -v -C/usr/share/arduino/hardware/tools/avr/etc/avrdude.conf -patmega328p -carduino -P/dev/ttyUSB2  -D -Uflash:w:/tmp/build2314497724350388190.tmp/sketch_nov13b.cpp.hex:i

I just replace the chip 128 with the 328 version and from Decimile my board name was changed to Uno or Ethernet due to the new baud rate 115200.

0

In my case the problem was raised when I was trying to do some "weird" arithmetic expressions

eg (3.14/4)/5 or 3.15%2.55

So, I would suggest you to check all the arithmetic expressions in case some of them cannot be calculated by the Arduino.

Hope it helps.

0

In my case (Mini Pro), solution was so simple, not sure how I missed that. I needed to crossover rx/tx wires.

Solution:

  • Arduino Rx pin goes to FTDI Tx pin.
  • Arduino Tx pin goes to FTDI Rx pin.

Not the answer you're looking for? Browse other questions tagged or ask your own question.