Failed uploading: uploading error

Hello everyone, I am a total beginner to Arduino, though I am a C programmer.
I have written a straightforward code in the IDE, it compiles fine but gives this error when it is uploading.
I don't know why.
Please your help would be very much appreciated.

  System wide configuration file is "C:\Users\DELL\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port: COM3
         Using Programmer              : Arduino
         Overriding Baud Rate: 115200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xd9
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xd9
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xd9
avrdude: stk500_recv(): programmer is
   ...
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xd9

avrdude done.  Thank you.

Failed uploading: uploading error: exit status 1

Go to:
IDE >> TOOLS >> PORT >> your port
IDE >> TOOLS >> BOARD >> AVR BOARDS >> your board

Sometimes the IDE just forgets what you have.

  1. Does that straight forward code make use of pins 0 and 1 (anything connected to them)?
  2. Anything else connected to the board?
  3. What is the serial-to-usb converter on your board (the chip closest to the USB port)? If it's not the CH340 (used on most clones), you can run the loopback test and report the results here.
  4. What happens when you press and release the reset button; do you get a few short flashes?
  5. Which board? The baud rate indicates a board with Optiboot (Uno or new Nano). If it's a Nano, try the different option under tools → processor.
  6. Does COM 3 disappear from the list of boards when you disconnect the board?
  1. No, it doesn't use the pins 0 $ 1
  2. Yes, just a joystick knob
  3. I really don't know what that means.
  4. The LED lights goes off and on.
  5. It's an Arduino Uno.
  6. No it doesn't.

It only displayed PORT 3. Is there a problem?

The chip circled in red is the serial-to-usb converter

image

The shown board has a square chip which is more than likely the an Atmel 16U2 (or 8U2); the 6 pin header next to it confirms this (it can be used to reprogram that chip).

I suspect that you have a rectangular chip instead of a square one which will probably be the CH340; Windows device manager should be able to confirm (last entry)

image

For a CH340, did you install the drivers? If you're using Windows 11, I advise not to install the latest version of the drivers but download the exe from How to Install CH340 Drivers - SparkFun Learn (not from the WCH page).

In that case COM3 is not the Arduino.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.