What's wrong? this is the error I got

Arduino: 1.8.13 (Windows 10), Board: "Arduino Uno"

Sketch uses 972 bytes (3%) 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: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xdf

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xdf

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xdf

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xdf

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xdf

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xdf

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xdf

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xdf

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xdf

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xdf

Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Welcome to the forum

Your topic was MOVED to its current forum category as it is more suitable than the original as it is not an Introductory Tutorial

What do you have connected to your Arduino UNO?

The code compiles fine. There is a problem with communication between the Arduino and the PC.

Did you follow the instructions in the trouble shooting page:

Is the TX LED lit or flickering when you plug in the UNO?

When a sketch does a lot of Serial output it can be very hard to upload a new sketch. The uploading program on the PC sends a command to the bootloader and reads a response. The USB input buffer is full of whatever the sketch was sending and that data does not match the expected response. The uploader tries the command a few more times before giving up.

To upload over a sketch that floods the Serial output:

  1. Hold down the reset button on the Arduino.
  2. Unplug the USB cable. This causes the PC to flush the USB receive buffers.
  3. Re-connect the USB cable. (by continuing to hold the reset button we prevent new flooding)
  4. Begin the new sketch upload.
  5. WHEN THE RX LED ON THE ARDUINO BLINKS (or you get a 'not in sync' error): release the reset button.

That RX blink is the first upload command being sent to the bootloader. Releasing the Reset button allows the bootloader to be ready for one of the retries of that command.

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