MATLAB: No Add-On Library Uploaded to Board Arduino UNO
조회 수: 28 (최근 30일)
이전 댓글 표시
Hey guys.
So, I have no idea why this code isn't working, and I have a massive headache from it lol. Just trying to do the simple "Mapping Your Surroundings" kiddie project from Mathworks and the code simply won't work. I get the error message:
"No add-on library uploaded to the board. Clear and recreate the current arduino object to include the appropriate library. For a list of available libraries, type 'listArduinoLibraries'."
I have the Arduino Support Package installed. That's all I should need according to the guide, I believe. I changed the code to fit with the newest version, yet nothing. Help me out here haha, code:
a = arduino('COM3', 'Uno' , 'Libraries' , {'Ultrasonic' , 'Servo'} ) ;
ultrasonic = addon(a, 'Ultrasonic' , 'D12', 'D13' );
servo_motor = servo(a, 'D3');
That's all the code before it stops haha, no clue what's going on. Any help is appreciated!
댓글 수: 0
채택된 답변
Rohan Kale
2021년 11월 30일
Hi Garth,
If you are using MATLAB version R2019a or beyond, the Ultrasonic library is already integrated with the support package and you can directly use the ultrasonic constructor to create Ultrasonic object -
>> u = ultrasonic(a, 'D12', 'D13'); % for R2019a or beyond
Refer to the ultrasonic documentation page at -
For versions R2018b or earlier, you will require to install the HC-SR04 addon-library from
and use the addon workflow to create the Ultrasonic addon object -
>> u = addon(a, 'JRodrigoTech/HCSR04', 'D12', 'D13'); % for R2018b or earlier
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 MATLAB Support Package for Arduino Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!