Lỗi không tìm thấy file hex của arduino

Trị con ATMEGA328P, đem con ở kit còn ok ráp sang kit lỗi, vì em viết là xài Xbee nên em sẽ có ít nhất 2 kit Arduino, nên không có gì khó khăn cả. Nếu ok thì con ATMEGA328P cũ bị lỗi làm bước [1], no ok làm bước [2].

[1] Upload lại bootloader cho ATMEGA328P theo hướng dẫn Arduino - ArduinoISP . Sau khi nạp lại bootloader vẫn vậy ===> thay con ATMEGA328P khác ( giá chợ 75k vnđ ), và upload lại bootloader cho nó.

[2] Cái này rất ít bị. Upload lại firmwares cho con ATmega16U2, con chip hình vuông nhỏ xíu

* Flip-tool: “Flip” writing-tool cho ATmega16U2. Downloading FLIP

* usbserial :“usbserial” file make ATmega16u2 thành usbserial-converter Arduino. Có trong “Arduino IDE” tại [xxx]\arduino-1.0.5\hardware\arduino\firmwares\atmegaxxu2\arduin o-usbserial\Arduino-usbserial-atmega16u2-Uno-Rev3.hex

Trong quá trình làm việc cũng như vọc vạch Arduino thì việc thêm thư viện cho arduino ide là một điều xảy ra thường xuyên, việc thêm một thư viện mới không hề khó khăn mà thực sự đơn giản. Hôm nay, mình sẽ hướng dẫn các bạn chi tiết làm sao để có thể thêm một thư viện mới vào Arduino IDE nhé. Nếu bạn là một người mới, lần đầu tiên đọc bài viết này, là người đang muốn tìm hiểu và học tập arduino thì bước đầu tiên bạn nên làm là tải phần mềm Arduino IDE về nhé. Mình sẽ để link bên dưới chỉ cần làm theo bài viết thì mọi việc sẽ trở nên đơn giản.

  • Xem ngay: Hướng dẫn cài đặt phần mềm Arduino IDE

2 Cách thêm thư viện Arduino IDE chuẩn nhất

Cách 1: Bạn khởi động Arduino IDE, click vào Sketch trên thanh công cụ chọn Include Library > Manage Libraries

Lỗi không tìm thấy file hex của arduino

Tiếp theo sẽ là vùng Library Manager là nơi chứa các thư viện mới nhất từ các doanh nghiệp, cộng đồng, cá nhân đã quyên góp tiền để xây dựng phần mềm. Bạn click vào Filter your seach để tiềm kiếm thư vện hoặc sử dụng Type và Topic để lọc ra các kết quả tìm kiếm mà bạn đang cần.

Lỗi không tìm thấy file hex của arduino

Khi đã chọn được thư viện cần, nhấn Install để tiến hành cài đặt.

Lỗi không tìm thấy file hex của arduino

Tiến hành kiểm tra xem thư viện đã được thêm vào chưa: Vào File > Examples.

Lỗi không tìm thấy file hex của arduino

Cách 2: Khởi động Arduino IDE, click vào Sketch trên thanh công cụ chọn Include Library > Add .ZIP library…

Lỗi không tìm thấy file hex của arduino

Truy cập vào thư mục mà bạn đã lưu thư viện có đuôi .ZIP.

Lỗi không tìm thấy file hex của arduino

Click vào thư viện mà bạn muốn cài đặt.

Lỗi không tìm thấy file hex của arduino

Nếu Upload thành công Arduino IDE sẽ xuất hiện thông báo Library add to your libraries. Check Include library menu.

Lỗi không tìm thấy file hex của arduino

Tiến hành kiểm tra xem thư viện đã được thêm vào chưa: Vào File > Examples.

Lỗi không tìm thấy file hex của arduino

Các lỗi thường gặp khi thêm mới thư viện Arduino IDE cần biết

Bị trùng lặp thư viện Arduino IDE

Một lỗi cơ bản nhưng những bạn mới tập tành Arduino hay mắc phải là thêm mới thư viện đã có trong hệ thống của Arduino. Vậy phải làm sao, cơ bản nhất là bạn không cần phải làm gì cả, trong trường hợp bạn muốn thêm thư viện mới thì bước đầu tiên cần xóa thư viện cũ trong hệ thống arduino đi, rồi add thư viện mới vào thế là xong nhé.

Hello friends, hope you all are fine.Firstly I am wishing you a Happy New Year. In today’s post, I am going to share How to get Hex File from Arduino.If you have worked on PIC Microcontrollers or Atmel etc then you have seen that you always get hex file from their compilers and then you burn that hex file in the respective microcontroller using their programmer or burner. But that’s not the case with Arduino. In Arduino boards, you simply plug it into your computer and you hit Upload button and the code automatically gets upload in Arduino boards. It doesn’t create any hex file.There are many cases when hex file is required. For example, instead of using Arduino board you just want to use the ATmega microcontroller then the easiest way is to write the code in Arduino and then get its hex file and upload it in your microcontroller, which makes the task quite easy. Another example is Proteus simulation, when you want to simulate your Arduino board in Proteus software then you need to get the hex file so that you can upload it to your Arduino board.

Let's Start, Follow the Steps:

Step 1: Step 1

  • First of all, open your Arduino software and write your code and test it.
  • Once you are confirmed that your code is ready and you want to generate the hex file, then click on File option in the above menu and then Preferences as shown in figure.

In the above figure, I have used the a example of LED Blink and I am gonna generate its hex file.

Step 2: Step 2

  • Now when you click on the Preferences, a new window will pop up.
  • In this new window, tick the compilation option as shown in a figure.
  • After ticking it, now click on the OK button and this dialog box will close.

Note:

By ticking this option you are allowing the Arduino software to show verbose outputs in the output panel present at the end of Arduino software, which has a black background.So, you can also tick the upload option but you need to upload the code to get these output commands.

Step 3: Step 3

  • Now hit the compile button as we tick the compilation option, so it will compile the code and will give you all the commands as shown in fig.
  • Now you can see clearly in the above figure that there are many commands in the black portion, these are the verbose outputs which Arduino is giving us.
  • The last line of these outputs, which I have also indicated the link to your hex file, which in my case is:

C:\UsersSachin\AppData\Local\Temp\arduino_build_336145/sketch_aug14a.ino.hex

Now, remove the name of the hex file from this link and it will become: