Uploading error when uploading simlple code to my Genuino Uno

Ever since i got my genuino uno, i havent been able to upload code to it. I have an arduino micro which works just fine. I have the latest version of the Arduino IDE, all the necessary drivers and packages are installed.

This is the error message:

An error occurred while uploading the sketch
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

I have tried all the troubleshooting options which seem logical but the problem persists >:( .

This is my code:

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);
  delay(1000);                      
  digitalWrite(LED_BUILTIN, LOW); 
  delay(1000);

Correct port selected? Correct board selected? If both are yes, I suspect a missing bootloader. Does the pin13 led flash a few times in quick succession at power up (not the blink sequence).

You were nearly right with the posting using code tags; replace the < by [code] and the /> by [/code]. The </> is the button in the advanced editor on the webpage that will does the same :wink:

Hello, thank you for replying and for the avice on posting code, it is always aprreciated :slight_smile: .

Yes, the correct port and board are selected. However, the pin13 led doesn't flash when I plug it in to my computer and it powers up.

I am farely new when it comes to electronics and programming so i have no idea what a bootloader is.

The boot loader is a piece of software embedded in the Arduino; it looks for certain commands after a reset that indicate that you're doing an upload.

If the led does not flash (3 times ?) in quick succession, there is no boot loader on the board. Usually Arduinos come with the blink sketch uploaded as well; do you get the usual blink effect (one second on / one second off) pattern?

You have an Arduino Micro that you can probably use as a programmer to burn the boot loader; I've never done that (I have a dedicated programmer) so can't quite advise there. I suggest that you google around a bit; or wait for the more knowledgeable people here to climb in.

ok, thank you for clearing that up.

I do get the usual blink effect pattern on my Genuino though.

I'm pretty sure that my arduino dsoes not have a bootloader; Thank you for figuring that out!

I'm going to wait a bit and see if anyone can advise me on what i should do before looking for a solution somewhere else.

Anyways, thank you.

Raph_395:
I do get the usual blink effect pattern on my Genuino though.

I'm pretty sure that my arduino dsoes not have a bootloader;

Those two statements taken together do not seem to be consistent with the advice in Reply #3.

And if you bought a genuine Arduino it would have had the bootloader code when you got it unless it was faulty right from day one.

Have you done anything that might have deleted or corrupted the bootloader code?

...R

Yes, i do have a genuine Genuino. I'm pretty sure that @sterretje meant that if my Genuino flashes it means that it has bootloader.

Although, i don't know if preforming a master reset could have an affect on the bootloader code, knowing that i have preformed some.

I haven't done anything, i think, which could have altered the bootloader code.

I appreciate the help.

Please keep the help coming :slight_smile: .

-Raph

Hello,

So to recap:

-My Genuino Uno is genuine but whenever i try to upload code to it, i get the stk500 error message.

-The built in LED doesn't flash when i plug my board into my computer which indicates (if I understand correctly) that my board, for some reason, doesn't have a bootloader.

-However, my board did seem to have the basics blink program uploaded into it when i first got it and it still does.

-I googled around and found a couple pages on the Arduino website all about burning bootloaders.

Now the only thing stopping me from burning the bootloader onto my arduino is that i want to be sure that my problem is, in fact, a missing bootloader.

Should i go straight ahead and burn the bootloader or is there anything else which could be the problem at hand?

-Raph

Raph_395:
Now the only thing stopping me from burning the bootloader onto my arduino is that i want to be sure that my problem is, in fact, a missing bootloader.

Should i go straight ahead and burn the bootloader or is there anything else which could be the problem at hand?

You didn't say if you had used another USB cable. I have only been caught once that way and it was a phone charge cable.

Just hooked up a Pro Micro and loaded Arduino as ISP sketch. Hooked up the wires and changed the Ide to Arduino Uno and burned bootloader. No Problems, used pin 10 on the Pro micro for the reset.

Hello,

I would like to test another USB cable but the problem is that Genuinos use USB printer cables which, lucky me, i only have one of and therefore have no way of knowing.

kprims:
No Problems, used pin 10 on the Pro micro for the reset.

As you can tell, I am a noob and don't know what you mean by this; there is already a reset button on the board.

Thanks for the help regarding burning the bootloader, I appreciate it :slight_smile: .

Press and release reset with the board plugged in, and look for a triple-blink pattern. The bootloader only runs after a reset, not at power on, so you won't see a blink from the bootloader if you just apply power, so the test others were recommending above is not conclusive.

(this is true of AVRs with hardware bootloader support, like all official boards and most third party boards based on atmega-series micros; third party boards that don't have hardware bootloader support, but do use a bootloader, like some ATTiny boards, will flash on power on)

Hello, i did what you told me to and nothing happened, I'm guessing this means i have no bootloader.

Thank you very much!

Ill proceed to burning the bootloader.

Once again, thank you.

@DrAzzy

Press and release reset with the board plugged in, and look for a triple-blink pattern. The bootloader only runs after a reset, not at power on, so you won't see a blink from the bootloader if you just apply power, so the test others were recommending above is not conclusive.

(this is true of AVRs with hardware bootloader support, like all official boards and most third party boards based on atmega-series micros; third party boards that don't have hardware bootloader support, but do use a bootloader, like some ATTiny boards, will flash on power on)

I hesitate to do this. But I am a little confused. This seems backwards to what I thought I knew. Not the first time I have been wrong either. :slight_smile:

When I plug my regular Uno's into the USB port to power them they always do the triple blink. When testing clones, the one I have do not triple flash when plugged into a USB port or a 5V wall outlet.

This thread talks about Nano clones.

Strange behaviour on Power up with a Nano Clone.

Posts #7,#8 and #9 in particular.

https://forum.arduino.cc/index.php?topic=540520.msg3684245#msg3684245

kprims:
@DrAzzy

I hesitate to do this. But I am a little confused. This seems backwards to what I thought I knew. Not the first time I have been wrong either. :slight_smile:

I think DrAzzy is a bit confused :wink: 328P based Arduinos have the triple flash on any reset, 32U4 don't have the triple flash after a power cycle.