Sửa lỗi an error occurred while uploading the sketch

Recently, after my OS was reinstalled installed the lademo version of Arduino IDE lớn my Win 10 máy tính xách tay. I opened a sample sketch, the blinky, connected my Arduino Nano, selected the right port và board & clicked on upload.

Bạn đang xem: Sửa lỗi an error occurred while uploading the sketch


*
Arduino Nano Code Upload Error

The code was compiled in 3 seconds, but it was stuchồng in the upload part.

Arduino Nano Code Upload Error Video Tutorial


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=0x00avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00An 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 lớn upload the code lớn the one that was working, I got the same error. I tried to reinstall Arduino IDE, removed and added all the boards và even tried to lớn manually install the drivers.

How khổng lồ Fix An error occurred while uploading the sketch?

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

This is how you bởi it.

Xem thêm: GiảI M㣠Cung Hoàng Đạo Cung Sư Tử (Chiêm Tinh), Tính Cách Cung Sư Tử (Leo)

Why not make a PCB for your Project?

Making a PCB for your DIY project is not hard nowadays. PCB helps khổng lồ get rid of all messy wires và stuff & give your project an awesome look. And its cool to lớn make your own PCB for your project right?

Designing a PCB for your Project – The Easy Way

I use Altium Designer khổng lồ draw the circuit và design the PCB. It is a powerful tool that can be used to lớn kiến thiết và create your own PCBs for your project as well as complex and multiplayer PCBs for industrial use. Here is the link to lớn the Altium trial version. So make sure you kiểm tra it out.


Start Designing your own PCB

Getting PCBs Done

I usually order our PCBs from PCBWay. PCBWay is a PCB manufacturer specializing in PCB prototyping, low-volume production, & neat & tidy PCB Assembly for a very low price. They have sầu a very friendly customer tư vấn team and even perkhung a không tính phí PCB Design Review before payment và inkhung us if there is some issue with the design. Feel miễn phí khổng lồ check out their trang web below.


Make your own PCB for your Project

Steps khổng lồ Fix Arduino Nano Upload Error

Step 1 – Write the code

First thiết đặt the code you want khổng lồ upload

Step 2 – Connect the Board

You can connect now you arduino nano board lớn your PC.

Xem thêm: Cách Sửa Lỗi Font File Csv Trong Excel, Sửa Lỗi File

Step 3 – Choose the correct Port và Board

I Arduino IDE, you can have sầu khổng lồ select the correct port và board.

Tools —> Boards —> Arduino NanoTools —> Port —->

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

Now you have to lớn select old bootloader by –

Tools —> Processor —> Atmega32Phường. (OlBootloader)


*
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 khổng lồ your Arduino by clicking the upload button.


Chuyên mục: Kiến Thức