avrdude: verification error on Arduino Uno

I bought an Arduino Starter Kit from Amazon (https://www.amazon.com/gp/product/B009UKZV0A/) almost two weeks ago. It comes with an Arduino Uno R3 board. I’m using a Windows 8.1 64-bit computer.

I downloaded the Arduino IDE 1.8.1 from their website. I plugged in the board with the included USB cable. I was able to upload the example Blink sketch and even fiddle with the delay times to make the light blink faster. I then followed along through lesson 1 in the included book, which was fun.

A few days later I started to go through lesson 2. I assembled everything on the board, then typed up the sketch as written in the book. When I clicked upload, I received the error

Sketch uses 1220 bytes (3%) of program storage space. Maximum is 32256 bytes.
Global variables use 11 bytes (0%) of dynamic memory, leaving 2037 bytes for local variables. Maximum is 2048 bytes.
avrdude: verification error, first mismatch at byte 0x0002
         0x5c != 0x61
avrdude: verification error; content mismatch
avrdude: verification error; content mismatch

I tried uploading the Blink sketch again to test the problem. When I upload the default sketch, it goes through without a problem. When I try to change the delay values and upload again, roughly the same error pops up.

Sketch uses 926 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
avrdude: verification error, first mismatch at byte 0x0042
         0x15 != 0x14
avrdude: verification error; content mismatch
avrdude: verification error; content mismatch

I searched online for this error, and read through many posts on this forum from people who had the same error. I didn’t find anyone who had the exact same situation as me and was able to get the problem resolved, however. I’ve also read the Troubleshooting guide and couldn’t find anything that seemed to pertain to this problem. I tried using a different USB port and nothing changed. I tried using Upload Using Programmer, and received the unhelpful error

An error occurred while uploading the sketch

I’m not super tech-savvy and the only thing I know about electronics is what I’ve read in the first 50 or so pages of the book from this kit. I’m hoping to get this problem resolved so that I can continue to learn electronics and programming. Let me know if you need any additional information. Thank you for any help you can provide.

I searched online for this error, and read through many posts on this forum from people who had the same error. I didn't find anyone who had the exact same situation as me and was able to get the problem resolved, however. I've also read the Troubleshooting guide and couldn't find anything that seemed to pertain to this problem. I tried using a different USB port and nothing changed. I tried using Upload Using Programmer, and received the unhelpful error

I don't know if I can help you, but it doesn't look like anyone else is going to reply. My guess is, for some reason your board is not writing the hex file when you are trying to upload your sketch. When I upload Project 2 - Spaceship Interface after having the Blink sketch on the Uno the first byte that changes with the new sketch is byte 0x0002 which changes to 0x61. 0x5c is byte 0x0002 of the Blink sketch.

My other guess is that reloading the bootloader would probably fix the problem. Since you are just starting out it might be the best option to return the Uno to Amazon or Arduino and get a replacement.

If you are going to keep playing with Arduino I feel you will need an ISP programmer with a 6 pin adapter or cable. I prefer a cheap USBasp which you can get on Ebay for around $2.00. Get 2 if you go this route.

Another Option is to buy a atmega328p-pu chip with the bootloader already loaded.

Or you could buy another Uno and use it as Arduino as ISP to try bootloading your original.

I appreciate your response. The kit is still within the 30-day Amazon return window, if it comes to that.

I’m very new to this world, so I’m unfamiliar with a lot of the terms or devices you mentioned. Would you mind explaining “hex file”, “bootloader”, “ISP programmer”, and “atmega328p-pu chip”, and how they fit into the big picture of using a (starter) Arduino kit?

Thanks.

I’m very new to this world, so I’m unfamiliar with a lot of the terms or devices you mentioned. Would you mind explaining “hex file”, “bootloader”, “ISP programmer”, and “atmega328p-pu chip”, and how they fit into the big picture of using a (starter) Arduino kit?

Well, when you compile your Blink sketch, it turns into Blink.ino.hex:i which when you hit the upload button is sent out on the USB serial port you have selected. The bootloader is used to load the hex file into the atmega328p-pu chip.

The ISP programmer is used to set the fuse bits and write the bootloader and can be used to load sketches also. Note that if you use the ISP to up load sketches it wipes out the bootloader and you will have to reload the bootloader before uploading sketches using the USB serial port.

As far as the big picture (starter) kit goes you may be perfectly happy just returning your Uno and getting a new one. I hesitated posting because your particular problem doesn’t seem to have a firm answer and really shouldn’t be something a person just starting out should have to solve. Anyway there are a lot of Youtube videos out that cover how to do this.
Disclaimer: You are getting this from a newbie who will never be as knowledgeable as most of the experts on here.