hello I have arduino uno, I have been trying to upload a sketch to it but I keep getting this avrdude:stk500_getsync() error.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xcf
It used to get uploaded fine before and then I had the sketch on it for a few days, but now it is giving this error when I try to upload, but my pre uploaded sketch on it works fine.
I tried few things I could find online like updating drivers, different ide and computer, selecting the correct board, port and some other things that didn't work. I read it is possible the bootloader on it is corrupted, if that is the case, how can I fix this?? I have arduino nano, Is there any tutorial on how to flash bootloader onto my uno with nano?? Since the problem is that it can't communicate with my computer, is there any other way I can bypass this bootloader problem??? Do I need to buy one of those UsbIsp avr programmer, will that fix it???
I know it is cheap to just buy another arduino, but I want to know how to fix this problem in case it happens again. Im just new to all this, hope someone can help.
You say you have the correct port. Just to double check, is it the port that shows in Windows device manager (or Linux/Mac equivalent applications) when you connect the board?
Is anything connected to pins 0 and 1; this can interfere with serial communication. Disconnect if that's the case.
Run the loop-back test. What is the result? If it passes, the problem is in the communication path on the board between the TTL-to-USB chip and the 328P or in the 328P microcontroller.
I've never used an Arduino to program the boot loader in another one; I use a programmer. It should be straight forward to use the Nano as the programmer instead of an other Uno if you follow the instructions for the Uno.
Anything connected to reset will also break uploads.
Also, the bootloader almost never corrupts itself, not on boards with BOOTRST. Is your old sketch still running, ie, are you sure the board hasn't been damaged?
Yes the port is same one that shows up in device manager, I don't have anything connected to those pins. I tried to do the loop back test, but when I connect my reset pin to ground, then it stops being detected, and I can't open serial because it says board on portX is not available...So I tried to open serial monitor window before connecting reset to ground, but then it doesn't echo back anything I type.