in

[Solved] An error occurred while uploading the sketch. Arduino Nano Code Upload Error avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00

Recently, after my OS was reinstalled installed the latest version of Arduino IDE to my Win 10 laptop. I opened a sample sketch, the blinky, connected my Arduino Nano, selected the right port and board and clicked on upload.

Arduino Nano Upload Error Solved
Arduino Nano Code Upload Error

The code was compiled in 3 seconds, but it was stuck in the upload part.

Arduino Nano Code Upload Error Video Tutorial

Arduino Nano Code Upload Error avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00

Easy way to fix code upload error for Arduino Nano How to Fix the Error Message while uploading code to Arduino Nano Boards?

Arduino Nano Code Upload Error Video Tutorial

Arduino Nano Code Upload Error

After a while, the IDE spitted out the following error message

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
An error occurred while uploading the sketch

What The … :/

First I thought there was something wrong with the Nano board I was using. But when I tried to upload the code to the one that was working, I got the same error. I tried to reinstall Arduino IDE, removed and added all the boards and even tried to manually install the drivers.

How to Fix An error occurred while uploading the sketch?

Well guys, the solution was simple. In the newer versions of Arduino IDE, you have to select Old Bootloader before uploading codes to newer boards.

This is how you do it.

Steps to Fix Arduino Nano Upload Error

Step 1 – Write the code

First setup the code you want to upload

Step 2 – Connect the Board

You can connect now you arduino nano board to your PC.

Step 3 – Choose the correct Port and Board

I Arduino IDE, you can have to select the correct port and board.

  • Tools —> Boards —> Arduino Nano
  • Tools —> Port —-> <Your Port>

Step 4 – Select “Old Bootloader” (The Key)

Now you have to select old bootloader by –

Tools —> Processor —> Atmega32P (OlBootloader)

Arduino Nano An error occurred while uploading the sketch
Arduino Nano Code Upload Error Solved

Step 5 – Compile the Code

Now you can go ahead and compile the code

Step 6 – Upload

Once the code is compiled, you can now easily upload the code to your Arduino by clicking the upload button.

New to Robotics?

We have a beginners guide on “Getting Started with Robotics” which will give you a kick start in this field. Check out our free video tutorial below for a brief introduction.

Robotics for Beginners and Kids
Rating
[Solved] An error occurred while uploading the sketch. Arduino Nano Code Upload Error avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
4.4 rating based on 12,345 ratings
Overall rating: 4.4 out of 5 based on 241 reviews.

Written by Jithin

Leave a Reply

Your email address will not be published. Required fields are marked *

Simple Line Follower Robot using Arduino – Step By Step

4 Wheel Drive Tracked Robot Tutorial