Ошибка programmer is not responding arduino

I have a Arduino Nano (Sainsmart) that I'm trying to upload a sketch to. Under the Arduino IDE, the device selected was Arduino Nano w/ ATmega328. However uploading the sketch gives me the error

I have a Arduino Nano (Sainsmart) that I’m trying to upload a sketch to. Under the Arduino IDE, the device selected was Arduino Nano w/ ATmega328.

However uploading the sketch gives me the error

avrdude: stk500_recv(): programmer is not responding

I tried both USB ports (/dev/tty.usbserial & /dev/cu.usbserial) but the same error persist. The Arduino is connected to a Macbook Air via the USB cable, and the PWR LED indicator light on the Arduino is turned on and the L indicator LED blinks. There was no problem uploading to a Arduino Uno.

Retried after installing the latest FTDI drivers (MAC OSX, x64, v2.2.18, FTDIUSBSerialDriver_10_4_10_5_10_6_10_7.mpkg) from http://www.ftdichip.com/Drivers/VCP.htm. However that did not help.

What could have gone wrong?

asked Mar 18, 2014 at 21:01

Nyxynyx's user avatar

NyxynyxNyxynyx

1,3194 gold badges20 silver badges25 bronze badges

0

This error message basically shows up for any communication problem, so by itself, it is not all that instructive. The Arduino Nano is supposed to have auto-reset, but maybe your clone does not? In that case, you’d have to press the reset key on the board just before starting an upload.

answered Mar 18, 2014 at 22:05

microtherion's user avatar

microtherionmicrotherion

1,4928 silver badges19 bronze badges

4

Know this is old but I ran onto it during my search for Nano(V3)’s not uploading so thought might help someone else. Problem is the bootloader — Arduino IDE BUT I Found an easy solution (right under my nose).

I realized that my nano’s had been uploading just fine then I had finally updated the Arduino AVR Boards from 1.6.20 to 1.6.21. I didn’t think there was any problems because it still showed my Nano and ATmega328 etc in the board manager after the change.

But the new boards manager has a new ATmega328 processor choice for the Nano. I changed processor: In the Arduino IDE select TOOLS > PROCESSOR > pulldown menu from ATmega328P to "ATmega328P (Old Bootloader)".

Since then, I have uploaded many programs to several different Nano’s V3 (Prolofic interace Chipset) without issue.

Chris Stratton's user avatar

answered Apr 19, 2018 at 14:49

Goofy Brained's user avatar

7

I was having the same problem and got the same error message. Turns out these boards don’t come with a bootloader preinstalled. If you have some jumper wires and another working arduino you can use this tutorial to install the bootloader and it should work great, mine did at least! :)

answered May 14, 2015 at 23:57

electriccello's user avatar

Having a similar issue with my Sainsmart Nano.

Under Preferences check «Show verbose output during [x] upload, then when uploading, you should get a red trace like this:

avrdude: Version 5.11, compiled on Sep  2 2011 at 18:52:52
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/johannes/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/tty.usbserial-A403MRTP
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 

You’ll notice a little «pause» just before the first line of avrdude: Send: 0 [30] [20]. Try uploading again and have you finger ready on the physical reset button of your Nano. Just the moment before the first avrdude: ... appears, press the reset button.

When you succeed, you’ll see the screen filling with all sort of gibberish, and ending something like this after a few seconds:

[78] . [00] S [53] h [68] o [6f] u [75] l [6c] d [64]   [20] b [62] e [65]   [20] 0 [30] x [78] 4 [34] 9 [39] D [44] 4 [34] . [00] . [01] . [00] . [00] . [00] . [02] . [00] . [03] . [00] . [04] . [00] . [00] . [00] . [00] . [00] . [e6] . [06] . [b5] . [06] n [6e] . [06] w [77] . [06] . [8c] . [06] . [9d] . [06] . [00] . [00] . [00] . [00] . [02] . [0d] . [aa] . [0d] . [95] . [0c] . [c9] . [0c] . [a9] . [0c] . [f2] . [0c] . [00] 
avrdude: Recv: . [10] 
# | 100% 3.71s

avrdude: verifying ...
avrdude: 8824 bytes of flash verified
avrdude: Send: Q [51]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [10] 

avrdude done.  Thank you.

answered Feb 19, 2015 at 12:51

kontur's user avatar

konturkontur

1731 silver badge8 bronze badges

1

I recently had the same issue with 3 Nano boards I just purchased from Amazon. I can confirm that the suggested fix (changing to «old bootloader») solved my problem.

I think the main problem is the upload speed. The «old bootloader» version successfully uploads at 57600, but the default «new» version tries to upload at 115200 and fails.

sa_leinad's user avatar

sa_leinad

3,1201 gold badge20 silver badges49 bronze badges

answered May 8, 2018 at 1:54

Curtg's user avatar

CurtgCurtg

572 bronze badges

2

Did you remember to tell the IDE that the board type is a Nano?

Tools -> Board => Arduino Nano ...

This gets me every time I swap between my Nano and Uno.

answered Jun 25, 2014 at 8:00

Kingsley's user avatar

KingsleyKingsley

7735 silver badges12 bronze badges

I also had that error message. I think there are many possible causes, so I haste to specify my special case.

I have a hackintosh with OS X Yosemite 10.10.2, Arduino software 1.0.6 and Funduino UNO. Uploading the example for Serial.write() succeeded the first time. Thereafter most uploads failed. Even when the upload succeeded the serial monitor would not always show output.

This seemed to me to be due to miscommunication on the USB port. I had to repeatedly reset the funduino, unplug and replug the USB cable or even restart the system. When replugging the USB cable sometimes my system would freeze.

By googling I found a solution to «Inserting USB device causes Mavericks 10.9.1 to freeze».
Answer no 12 on tonymacx86.com basically instructs you to remove GenericUSBXHCI.kext from /System/Library/Extensions.

I am happy to report that after removing this kext I have no problems uploading the example and monitoring the output. Because I don’t need to replug the USB cable I don’t know whether this solves my system freeze. I’m not even sure it was a system freeze, because my system may only have become unresponsive to my USB keyboard and mouse.

answered Feb 7, 2015 at 23:35

Jan E. Jonker's user avatar

Had same issue and solution was as follows:

  • identified my arduino as CH340/ATmega168P (written on PCB)
  • went to IDE and picked from list not UNO but «Arduino Pro or Pro Mini»
  • when this option is selected new menu «Processor» selection is available (just under Board selection)
  • selected my processor ATmega168P there and upload worked like a charm!

sa_leinad's user avatar

sa_leinad

3,1201 gold badge20 silver badges49 bronze badges

answered Jan 28, 2017 at 20:52

Radovan Rodak 's user avatar

1

The Arduino IDE version 1.8.5 gave the same error every time I tried to connect it to my OSEPP Nano. I tried with multiple nano boards with different versions of the IDE. I had the board set to «Arduino Nano».

The solution was: Instead of Nano choose Arduino/Genuino Uno. This worked for me.

JShorthouse's user avatar

answered Dec 3, 2017 at 21:05

JTK's user avatar

If this doesn’t work you will have to use spi to program the nano. You’ll need to look up the connection and use a uno since it has a serial chip at16u2 with a driver that recognizes all atmel products. After connections setting uno as a programmer by flashing the uno as isp set the programmer as Arduino as isp and flash the chip. Double check. The benefit is it is less error prone than uart and has better timing but is a hassle to wire up. Good Luck

answered Dec 10, 2017 at 22:59

JKing's user avatar

That problem, ocurred to me when I upgraded the Arduino IDE. I solved it by changing the processor to «old»

Tools->Processor->»ATmega328P (old bootloader)»
thanks!!!!

answered May 2, 2018 at 12:14

user3739283's user avatar

1

Ok. I had the same programmer is not responding error on Arduino Nano on Atmel MEGA168PA, USB chip: CH340G. Macbook Pro under macOS 10.14.2.

It hand Blink example installed and the port wasn’t visible in the list.

I was trying to figured out, whats wrong and connected my Arduino Due through the programming port. After 2 attempts the sketch was uploaded… Then I connected the Nano back, the port was visible this time (actually two of them: /dev/cu.wchusbserial14120 and /dev/cu.usbserial-14120) and guess what, the upload had been successful!

Magic!

answered Jan 10, 2019 at 17:25

kelin's user avatar

kelinkelin

1471 silver badge14 bronze badges

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.

Ever stumbled across this error message when trying to upload a sketch?

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00

avrdude: stk500_recv(): error message from Arduino IDE

Is this some kind of joke? Who is this mysterious AVR Dude, why is he so uncool, and — most importantly — what does he have against you trying to upload a sketch to your Arduino? It’s beyond frustrating.

In this quick lesson, you’ll learn how to banish the mysterious AVR dude to the dusty highways of the nether realms. Or, to be less poetic, you’ll learn how to get rid of this error so you can get back to uploading your sketch.

So who is this AVR dude, and why does the error happen?

AVRDude stands for AVR Downloader Uploader and is a utility used by the Arduino IDE. The utility’s main job is pretty straightforward — it allows you to load code onto your Arduino board.

So that’s who the dude is, but why does the error happen?

The avrdude: stk500_recv() error message is alerting you to a generic connection error between your computer and the Arduino. I wish I could keep it simple and tell you this error happens because of one single problem, but that would be too easy. This generic error can pop up for a host of reasons.

But don’t worry, I’ve got your back. In this lesson, I’m going to go through a “laundry list” of possible solutions. (Many thanks to “The Guy with The Hat” from the Arduino Stack Exchange for compiling this great list of fixes.) I’ll walk through each in detail, starting at the most common and easiest and moving on to more detailed troubleshooting tasks if those don’t work.

Here goes.

Let’s start with the easy stuff

Before we touch on some of the more elaborate and involved potential solutions, it’s smart to rule out all those obvious and small glitches.

  • Disconnect and reconnect the USB cable: I told you we’d start simple.
  • Press the reset button: If your Arduino board has a reset button on it, press it and see if you can now upload without the avrdude: stk500_recv() error.
  • Close and reopen the Arduino IDE: Giving the Arduino IDE a fresh start can fix a host of problems avrdude stk500_recv errors included.
  • Make sure you have the right Arduino board selected: In the Arduino IDE, go to Tools> Board, and select the Arduino board you’re using from the list.

select Arduino Board from Arduino IDE

  • Make sure you have the correct port selected: In the Arduino IDE, go to Tools>Port and select the port corresponding to your board. On a PC, it will start with COM. On a Mac, it should start with cu.usb.
    select Arduino Port from Arduino IDE

Useful tip: If you’re unsure of the correct port, take note of all the ports you have listed. Then disconnect your Arduino board from the USB cable and check the port menu again. The port now missing from the list is the port your Arduino was using. 

  • Remove connections to the RX and TX pins: The Receive (RX) and Transmit (TX) pins (pins 0 and 1) are used when you upload sketches to your Arduino board. Unplugging connections to those pins may banish the avrdude: stk500_recv() upload error.
  • Remove any shields: If you have an Arduino shield attached to your Arduino board, remove the shield and try uploading again. The shield may have a circuit interfering with the transmit and receive pins.

Still getting avrdude: stk500_recv() error?

If you’re still getting the avrdude: stk500_recv() error, all is not lost — not by a long shot. It’s time to dig into some real troubleshooting.

So what could be going wrong here? We know the problem could be at three possible locations: the USB cable, the Arduino Board, or your computer. We’ll use a process of elimination to figure out the point of failure.

  • Test the USB Cable: USB cables fail, and surprisingly often. Check to see if using a different USB cable gets rid of the avrdude: stk500_recv() error.
  • Test another Arduino board: If you have one handy, try uploading to another Arduino board. Did the avrdude: stk500_recv() error suddenly vanish? Your original board is the likely culprit.
  • Test a different computer: If you’ve ruled out your USB cable and Arduino board, try uploading your sketch to another computer with the Arduino IDE installed on it. If you can successfully upload a sketch to the other computer, the avrdude: stk500_recv() error probably originates at your computer.

Once you have some hard data on the point of failure, you can read one of the following three sections to hone in on resolving the avrdude: stk500_recv() error.

The USB cable is to blame!

Well, I’ll go right ahead and state the obvious solution. Use a different cable 🙂

My computer is the problem

Here are three fixes you can try.

  • Reinstall the Arduino IDE: Just go to the Arduino website, download the most recent version of the IDE and install it again. Don’t worry, this won’t affect your old sketches. They’ll still be stored in your sketchbook folder.
  • Reinstall drivers: If you’re still getting the avrdude: stk500_recv() error, you’ll need to check that your drivers are installed correctly. These should be installed automatically when you install the Arduino IDE, but you can always try installing them manually.
  • Check to see if you need different drivers: Some Arduino clones require special drivers. You should be able to download these drivers from the website of the company that makes the board. If you can’t, contact the company directly.

My Arduino board is causing the stk500_recv() error:

This is where things get a little dicey. It may be that your Arduino board is bricked  — electronics speak for broken in a manner that does not allow fixing. But try these steps before you throw it out and buy a new board:

  • Check that the microcontroller is seated properly: Some Arduino boards have a removable microcontroller chip — the Arduino UNO, for example. Check that it’s seated properly on the circuit board.
  • Burn a new bootloader: The bootloader is a program on your microcontroller that allows sketches to run. A corrupt bootloader can cause the stk500_recv() error. Try burning a new bootloader on the microcontroller.
  • Swap out a spare microcontroller: Got a spare microcontroller handy? If the kaput Arduino board has a removable microcontroller, you could always replace it with your backup microcontroller. You’ll have to load the microcontroller with the bootloader — as described in the previous step.

Have you banished the dude?

By the time you get here, you’ll hopefully have banished the AVR dude back to the shadowy chaos realm from whence he sprung. With any luck, you’ll never meet him again. But if you do, now you have some tricks up your sleeve to get rid of the avrdude: stk500_recv() error swiftly and efficiently.

If you’re still getting the error, please read the comments below. You may find the hidden clue you’ve been looking for. Drop us a line in the comments if you don’t — someone out there may have faced the same problem.

And, of course, if you found a different solution, please leave a comment — it may help someone else.

Because sometimes evil dude banishment takes a village.

I have a Arduino Nano (Sainsmart) that I’m trying to upload a sketch to. Under the Arduino IDE, the device selected was Arduino Nano w/ ATmega328.

However uploading the sketch gives me the error

avrdude: stk500_recv(): programmer is not responding

I tried both USB ports (/dev/tty.usbserial & /dev/cu.usbserial) but the same error persist. The Arduino is connected to a Macbook Air via the USB cable, and the PWR LED indicator light on the Arduino is turned on and the L indicator LED blinks. There was no problem uploading to a Arduino Uno.

Retried after installing the latest FTDI drivers (MAC OSX, x64, v2.2.18, FTDIUSBSerialDriver_10_4_10_5_10_6_10_7.mpkg) from http://www.ftdichip.com/Drivers/VCP.htm. However that did not help.

What could have gone wrong?

asked Mar 18, 2014 at 21:01

Nyxynyx's user avatar

NyxynyxNyxynyx

1,3194 gold badges20 silver badges25 bronze badges

0

This error message basically shows up for any communication problem, so by itself, it is not all that instructive. The Arduino Nano is supposed to have auto-reset, but maybe your clone does not? In that case, you’d have to press the reset key on the board just before starting an upload.

answered Mar 18, 2014 at 22:05

microtherion's user avatar

microtherionmicrotherion

1,4928 silver badges19 bronze badges

4

Know this is old but I ran onto it during my search for Nano(V3)’s not uploading so thought might help someone else. Problem is the bootloader — Arduino IDE BUT I Found an easy solution (right under my nose).

I realized that my nano’s had been uploading just fine then I had finally updated the Arduino AVR Boards from 1.6.20 to 1.6.21. I didn’t think there was any problems because it still showed my Nano and ATmega328 etc in the board manager after the change.

But the new boards manager has a new ATmega328 processor choice for the Nano. I changed processor: In the Arduino IDE select TOOLS > PROCESSOR > pulldown menu from ATmega328P to "ATmega328P (Old Bootloader)".

Since then, I have uploaded many programs to several different Nano’s V3 (Prolofic interace Chipset) without issue.

Chris Stratton's user avatar

answered Apr 19, 2018 at 14:49

Goofy Brained's user avatar

7

I was having the same problem and got the same error message. Turns out these boards don’t come with a bootloader preinstalled. If you have some jumper wires and another working arduino you can use this tutorial to install the bootloader and it should work great, mine did at least! :)

answered May 14, 2015 at 23:57

electriccello's user avatar

Having a similar issue with my Sainsmart Nano.

Under Preferences check «Show verbose output during [x] upload, then when uploading, you should get a red trace like this:

avrdude: Version 5.11, compiled on Sep  2 2011 at 18:52:52
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/johannes/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/tty.usbserial-A403MRTP
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 

You’ll notice a little «pause» just before the first line of avrdude: Send: 0 [30] [20]. Try uploading again and have you finger ready on the physical reset button of your Nano. Just the moment before the first avrdude: ... appears, press the reset button.

When you succeed, you’ll see the screen filling with all sort of gibberish, and ending something like this after a few seconds:

[78] . [00] S [53] h [68] o [6f] u [75] l [6c] d [64]   [20] b [62] e [65]   [20] 0 [30] x [78] 4 [34] 9 [39] D [44] 4 [34] . [00] . [01] . [00] . [00] . [00] . [02] . [00] . [03] . [00] . [04] . [00] . [00] . [00] . [00] . [00] . [e6] . [06] . [b5] . [06] n [6e] . [06] w [77] . [06] . [8c] . [06] . [9d] . [06] . [00] . [00] . [00] . [00] . [02] . [0d] . [aa] . [0d] . [95] . [0c] . [c9] . [0c] . [a9] . [0c] . [f2] . [0c] . [00] 
avrdude: Recv: . [10] 
# | 100% 3.71s

avrdude: verifying ...
avrdude: 8824 bytes of flash verified
avrdude: Send: Q [51]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [10] 

avrdude done.  Thank you.

answered Feb 19, 2015 at 12:51

kontur's user avatar

konturkontur

1731 silver badge8 bronze badges

1

I recently had the same issue with 3 Nano boards I just purchased from Amazon. I can confirm that the suggested fix (changing to «old bootloader») solved my problem.

I think the main problem is the upload speed. The «old bootloader» version successfully uploads at 57600, but the default «new» version tries to upload at 115200 and fails.

sa_leinad's user avatar

sa_leinad

3,1201 gold badge20 silver badges49 bronze badges

answered May 8, 2018 at 1:54

Curtg's user avatar

CurtgCurtg

572 bronze badges

2

Did you remember to tell the IDE that the board type is a Nano?

Tools -> Board => Arduino Nano ...

This gets me every time I swap between my Nano and Uno.

answered Jun 25, 2014 at 8:00

Kingsley's user avatar

KingsleyKingsley

7735 silver badges12 bronze badges

I also had that error message. I think there are many possible causes, so I haste to specify my special case.

I have a hackintosh with OS X Yosemite 10.10.2, Arduino software 1.0.6 and Funduino UNO. Uploading the example for Serial.write() succeeded the first time. Thereafter most uploads failed. Even when the upload succeeded the serial monitor would not always show output.

This seemed to me to be due to miscommunication on the USB port. I had to repeatedly reset the funduino, unplug and replug the USB cable or even restart the system. When replugging the USB cable sometimes my system would freeze.

By googling I found a solution to «Inserting USB device causes Mavericks 10.9.1 to freeze».
Answer no 12 on tonymacx86.com basically instructs you to remove GenericUSBXHCI.kext from /System/Library/Extensions.

I am happy to report that after removing this kext I have no problems uploading the example and monitoring the output. Because I don’t need to replug the USB cable I don’t know whether this solves my system freeze. I’m not even sure it was a system freeze, because my system may only have become unresponsive to my USB keyboard and mouse.

answered Feb 7, 2015 at 23:35

Jan E. Jonker's user avatar

Had same issue and solution was as follows:

  • identified my arduino as CH340/ATmega168P (written on PCB)
  • went to IDE and picked from list not UNO but «Arduino Pro or Pro Mini»
  • when this option is selected new menu «Processor» selection is available (just under Board selection)
  • selected my processor ATmega168P there and upload worked like a charm!

sa_leinad's user avatar

sa_leinad

3,1201 gold badge20 silver badges49 bronze badges

answered Jan 28, 2017 at 20:52

Radovan Rodak 's user avatar

1

The Arduino IDE version 1.8.5 gave the same error every time I tried to connect it to my OSEPP Nano. I tried with multiple nano boards with different versions of the IDE. I had the board set to «Arduino Nano».

The solution was: Instead of Nano choose Arduino/Genuino Uno. This worked for me.

JShorthouse's user avatar

answered Dec 3, 2017 at 21:05

JTK's user avatar

If this doesn’t work you will have to use spi to program the nano. You’ll need to look up the connection and use a uno since it has a serial chip at16u2 with a driver that recognizes all atmel products. After connections setting uno as a programmer by flashing the uno as isp set the programmer as Arduino as isp and flash the chip. Double check. The benefit is it is less error prone than uart and has better timing but is a hassle to wire up. Good Luck

answered Dec 10, 2017 at 22:59

JKing's user avatar

That problem, ocurred to me when I upgraded the Arduino IDE. I solved it by changing the processor to «old»

Tools->Processor->»ATmega328P (old bootloader)»
thanks!!!!

answered May 2, 2018 at 12:14

user3739283's user avatar

1

Ok. I had the same programmer is not responding error on Arduino Nano on Atmel MEGA168PA, USB chip: CH340G. Macbook Pro under macOS 10.14.2.

It hand Blink example installed and the port wasn’t visible in the list.

I was trying to figured out, whats wrong and connected my Arduino Due through the programming port. After 2 attempts the sketch was uploaded… Then I connected the Nano back, the port was visible this time (actually two of them: /dev/cu.wchusbserial14120 and /dev/cu.usbserial-14120) and guess what, the upload had been successful!

Magic!

answered Jan 10, 2019 at 17:25

kelin's user avatar

kelinkelin

1471 silver badge14 bronze badges

СОДЕРЖАНИЕ ►

  • Произошла ошибка при загрузке скетча в Ардуино
    • programmer is not responding
    • a function-definition is not allowed arduino ошибка
    • expected initializer before ‘}’ token arduino ошибка
    • ‘что-то’ was not declared in this scope arduino ошибка
    • No such file or directory arduino ошибка
  • Compilation error: Missing FQBN (Fully Qualified Board Name)

Ошибки компиляции Arduino IDE возникают при проверке или загрузке скетча в плату, если код программы содержит ошибки, компилятор не может найти библиотеки или переменные. На самом деле, сообщение об ошибке при загрузке скетча связано с невнимательностью самого программиста. Рассмотрим в этой статье все возможные ошибки компиляции для платы Ардуино UNO R3, NANO, MEGA и пути их решения.

Произошла ошибка при загрузке скетча Ардуино

Самые простые ошибки возникают у новичков, кто только начинает разбираться с языком программирования Ардуино и делает первые попытки загрузить скетч. Если вы не нашли решение своей проблемы в статье, то напишите свой вопрос в комментариях к этой записи и мы поможем решить вашу проблему с загрузкой (бесплатно!).

avrdude: stk500_recv(): programmer is not responding

Что делать в этом случае? Первым делом обратите внимание какую плату вы используете и к какому порту она подключена (смотри на скриншоте в правом нижнем углу). Необходимо сообщить Arduino IDE, какая плата используется и к какому порту она подключена. Если вы загружаете скетч в Ардуино Nano V3, но при этом в настройках указана плата Uno или Mega 2560, то вы увидите ошибку, как на скриншоте ниже.

Ошибка: programmer is not responding

Ошибка Ардуино: programmer is not responding

Такая же ошибка будет возникать, если вы не укажите порт к которому подключена плата (это может быть любой COM-порт, кроме COM1). В обоих случаях вы получите сообщение — плата не отвечает (programmer is not responding). Для исправления ошибки надо на панели инструментов Arduino IDE в меню «Сервис» выбрать нужную плату и там же, через «Сервис» → «Последовательный порт» выбрать порт «COM7».

a function-definition is not allowed here before ‘{‘ token

Это значит, что в скетче вы забыли где-то закрыть фигурную скобку. Синтаксические ошибки IDE тоже распространены и связаны они просто с невнимательностью. Такие проблемы легко решаются, так как Arduino IDE даст вам подсказку, стараясь отметить номер строки, где обнаружена ошибка. На скриншоте видно, что строка с ошибкой подсвечена, а в нижнем левом углу приложения указан номер строки.

Ошибка: a function-definition is not allowed

Ошибка: a function-definition is not allowed here before ‘{‘ token

expected initializer before ‘}’ token   expected ‘;’ before ‘}’ token

Сообщение expected initializer before ‘}’ token говорит о том, что вы, наоборот где-то забыли открыть фигурную скобку. Arduino IDE даст вам подсказку, но если скетч довольно большой, то вам придется набраться терпения, чтобы найти неточность в коде. Ошибка при компиляции программы: expected ‘;’ before ‘}’ token говорит о том, что вы забыли поставить точку с запятой в конце командной строки.

‘что-то’ was not declared in this scope

Что за ошибка? Arduino IDE обнаружила в скетче слова, не являющиеся служебными или не были объявлены, как переменные. Например, вы забыли продекларировать переменную или задали переменную ‘DATA’, а затем по невнимательности используете ‘DAT’, которая не была продекларирована. Ошибка was not declared in this scope возникает при появлении в скетче случайных или лишних символов.

Ошибка Ардуино: was not declared in this scope

Ошибка Ардуино: was not declared in this scope

Например, на скриншоте выделено, что программист забыл продекларировать переменную ‘x’, а также неправильно написал функцию ‘analogRead’. Такая ошибка может возникнуть, если вы забудете поставить комментарий, написали функцию с ошибкой и т.д. Все ошибки также будут подсвечены, а при нескольких ошибках в скетче, сначала будет предложено исправить первую ошибку, расположенную выше.

exit status 1 ошибка компиляции для платы Arduino

Данная ошибка возникает, если вы подключаете в скетче библиотеку, которую не установили в папку libraries. Например, не установлена библиотека ИК приемника Ардуино: fatal error: IRremote.h: No such file or directory. Как исправить ошибку? Скачайте нужную библиотеку и распакуйте архив в папку C:Program FilesArduinolibraries. Если библиотека установлена, то попробуйте скачать и заменить библиотеку на новую.

exit status 1 Ошибка компиляции для Arduino Nano

exit status 1 Ошибка компиляции для платы Arduino Nano

Довольно часто у новичков выходит exit status 1 ошибка компиляции для платы arduino uno /genuino uno. Причин данного сообщения при загрузке скетча в плату Arduino Mega или Uno может быть огромное множество. Но все их легко исправить, достаточно внимательно перепроверить код программы. Если в этом обзоре вы не нашли решение своей проблемы, то напишите свой вопрос в комментариях к этой статье.

missing fqbn (fully qualified board name)

Ошибка возникает, если не была выбрана плата. Обратите внимание, что тип платы необходимо выбрать, даже если вы не загружаете, а, например, делаете компиляцию скетча. В Arduino IDE 2 вы можете использовать меню выбора:
— список плат, которые подключены и были идентифицированы Arduino IDE.
— или выбрать плату и порт вручную, без подключения микроконтроллера.

Совершенно неожиданно у меня возникла проблема с добавлением нового скетча в Arduino. Arduino IDE стал зависать на моменте загрузки скетч в микроконтроллер на долгое время и потом выдавать множественные ошибки вида:

Код: Выделить всё

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x45
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x45
avrdude: stk500_recv(): programmer is not responding
.....
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x45
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x45

У меня была китайская Arduino Uno rev3, с которой я работал уже полгода без проблем. Покупал тут в составе набора для изучения (Starter Kit), и ей даже китайский драйвер CH340 не понадобился, заработала с фирменным из состава IDE. И внезапная ошибка «avrdude: stk500_recv(): programmer is not responding» меня — неопытного новичка, немного напугала. Четких инструкций для решения я не смог найти: либо старая версия IDE с несуществующими командами, либо не мой случай. Но вот, что случилось у меня. У китайцев для прошивки контролеров без USB (типа Arduino Mini) я прикупил программатора USBasp, который надо подключать к разъему ICSP на плате и немного «поиграл» с ним для проверки, заливая программу в большую Arduino Uno.

Разъемов, кстати, две штуки на плате, еще один для прошивки самого контролера USB интерфейса. Но нам это не нужно.
Изображение
И я так понял: при использовании программатора напрямую в ATmega заливается только сам скомпилированный код HEX, что позволяет сэкономить немного памяти для больших программ. А для работы через USB нужен еще и загрузчик Bootloader, который стирается программатором. И поэтому его нужно восстановить. Отключаем USB, подключаем назад USBasp и выбираем пункт Burn Bootloader, очень быстро внизу появится сообщение, что загрузчик успешно загружен и все! Можно снова подключаться по USB и работать как раньше.

Обратите внимание, что у меня выбран тип программатора USBasp (programmer), тип платы Arduino/Genuino Uno, а виртуального порта подключения нет, потому что USB отключен.

А вот если в меню выбрать пункт Export compiled Binary, то в папке проекта мы получи два файла:

  • test.ino.with_bootloader.standard.hex
  • test.ino.standard.hex

Которые будут отличаться небольшим куском кода, добавленным в конце.

Эти файлы нужно прошивать опять же программатором, использую специальные программы. Например, тот же AVRDude, название которого мы видим в ошибке.
Изображение
Но это уже другая история, свою проблему я решил, чего и вам желаю.

Вот нашел такое упоминание этого процесса в разделе про доступную память устройства.

https://arduinomaster.ru/platy-arduino/ … duino-uno/

Когда вы прошиваете контроллер своим скетчем, он записывается именно сюда. 2кБ из данного пула памяти отводится на bootloader- программу, которая занимается инициализацией системы, загрузки через USB и запуска скетча.

Драйвер USBasp-win-driver-x86-x64-v3.0.7.zip для своего китайского USBasp программатора я скачал отсюда USBasp AVR Programmer, Program Atmel AVR microcontrollers:

https://protostack.com.au/shop/accessor … -downloads

Ставил его на Windows 7 SP1 x64, устройство в системе появилось с названием libusbK Usb Devices. Драйверы есть еще у Zadig, на его сайт ссылается сам Thomas Fischl.

Понравилась статья? Поделить с друзьями:
  • Ошибка profile server db is unsupported due при запуске city car driving
  • Ошибка product key при установке windows 10
  • Ошибка problem loading acadres dll resource file
  • Ошибка prnd пежо 607
  • Ошибка prnd пежо 308 автомат