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
    Commented Aug 14, 2016 at 23:25
  • 1
    Genuine Uno from Arduino.cc
    – Osirus
    Commented Aug 14, 2016 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
    Commented Aug 15, 2016 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.
    – Osirus
    Commented Aug 16, 2016 at 1:51

5 Answers 5


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.
    – Osirus
    Commented Aug 16, 2016 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.


This is a guess based on what I have encountered previously. With all the information given remember I just took a guess!

Is it possible you are experiencing a serial flood, ie it is constantly sending something to the console. Take these steps several tries may be needed:

  1. Power off the board completely
  2. Remove the USB cable
  3. Hold down the Reset button
  4. keep it held down (or, run a jumper wire from the RESET pin to the GND pin).
  5. Still holding down Reset reconnect the USB cable.
  6. Start uploading a sketch that does not have this problem (I use the Blink sketch).
  7. When you see the Receive light blink, release the Reset button Note: I have seen this happen several times when I flood the serial output. An indication is the tx light is on.

You can check the hardware as follows. Here is a trick I use on some boards but first be the baud rate is the same in the terminal as in the sketch (Serial.begin(115200). If so then remove everything then put a jumper between ground and reset. Then put a jumper between TX and RX (pin o and pin 1 on uno). launch the IDE and what you type in the console should be echoed back to you. If this works the hardware is connected fine.


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
    Commented Aug 15, 2016 at 7:56
  • Tried, no change.
    – Osirus
    Commented Aug 16, 2016 at 1:51

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