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!