Today I tried to update the sketch on my Arduino Uno, but was unable to due to this error:

Sketch uses 1,870 bytes (5%) of program storage space. Maximum is 32,256 bytes.
Global variables use 188 bytes (9%) of dynamic memory, leaving 1,860 bytes for local variables. Maximum is 2,048 bytes.
D:\Users\User\Desktop\arduino-1.6.10\hardware\tools\avr/bin/avrdude -CD:\Users\User\Desktop\arduino-1.6.10\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM4 -b115200 -D -Uflash:w:C:\Users\User\AppData\Local\Temp\build2f7b4a32c3810b2d8e42648954faba05.tmp/nes_controller.ino.hex:i 
An error occurred while uploading the sketch

Nothing will upload to the board now. I tried uploading a simple sketch with empty setup() and loop() functions, I've tried different PCs and gotten the same error, I've swapped USB cables, I've double-checked that I'm using the right COM port, I've disconnected every wire from the Arduino pins - nothing has helped.

The old sketch is still running fine on the Uno. It was uploaded a few days ago using the exact same setup I'm trying right now.

The Arduino IDE doesn't even indicate any errors, everything compiles and looks good until "An error occurred while uploading the sketch"

  • I'm going to put this in a copy buffer I think... "Do you have a genuine Arduino or a (sigh) cheap Chinese clone?" – Majenko Aug 14 '16 at 23:25
  • Genuine Uno from Arduino.cc – Tyler O Aug 14 '16 at 23:30
  • 1
    Can you ask Arduino IDE to put some more verbosity (there is a preference for that IIRC)? Also how did you check that was the right COM port? Sometimes COM ports can change after a reboot. I always use listComPort.exe to check this first. – jfpoilpret Aug 15 '16 at 7:05
  • That's as verbose as it gets. No error description as to what happened. Ive tried different USB ports, Ive triple-checked the COM port. – Tyler O Aug 16 '16 at 1:51

You can set the verbosity level in the Arduino IDE:

  • File menu
  • Preferences
  • Settings tab
  • "Show verbose output during" => check "upload"
  • Click OK

Upload again, and note the additional output telling you what is wrong.

It should also point you to this URL, which points out the most occurring issues.

The issue I have most, is that I forget to switch between Micro and Uno board (as I deploy my sketch on both boards).


assumption is windows, so with the old ide's a reboot to free up the usb ports, or sometimes simply swapping the usb port, and changing the port in the tools > port menu.

does it identify the board you are using when you choose the port? (Genuino / Arduino)

  • Yes "Get Board Info" works and identifies my board. – Tyler O Aug 16 '16 at 1:51

In my experience, sketch upload error occurred due to 4 different mistakes: (1) Silly mistake: did not connect the serial cable to the PC (2) I did not choose the right com port (Tools/port). (3) I chose the wrong board type (Tools/board). connected a Nano, but selected Uno while uploading. (4) While updating my Arduino IDE to the a version, I failed to select 'download USB drivers' option. There are 2 or 3 of them.


right click on computer, manage, device manager and disable the usb driver and enable it again.

  • This answer does not provide enough detail for it to be useful to the OP. Please provide more info such as: on which OS you do what, screenshots to show each step. If you could also explain why that way shall work, that would be even better. – jfpoilpret Aug 15 '16 at 7:56
  • Tried, no change. – Tyler O Aug 16 '16 at 1:51

protected by Community Apr 17 '17 at 8:39

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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