Matlab安装Arduino函数库HC-SR04

Matlab安装Arduino函数库HC-SR04

这个官网给出的教程存在瑕疵HC-SR04 Add-On Library for Arduino,但还是能解决问题的。我是先在官网下的工具箱HCSR04_Add-On_Library_for_Arduino.mltbx,(如何安装)安装之后发现会报错,然后根据评论里的大佬的留言:到github上下载了一个文件,把解压后放到目录:
C:\MATLAB\SupportPackages\R2016a\arduino-1.6.1\libraries或者C:\Documents\Arduino\libraries
然后就可以使用了。

大佬原话如下:
Hi!
For all those who have downloaded and installed all the libraries but still cannot get their arduino board to work, follow the steps below. Skip those you’ve done already.
-install arduino support package for matlab.
-install arduino support package for simulink.
-download the hcsro4 arduino library from the link below
https://github.com/JRodrigoTech/Ultrasonic-HC-SR04/archive/master.zip
-extract the zip to Documents\Arduino\libraries" and rename it to ‘Ultrasonic’.
Note: if the exracted folder has two folder levels then you must delete one. see the paths below;
Correct path:
“Documents\Arduino\libraries\Ultrasonic”. then you see the “. h” file,…
Wrong path:
Documents\Arduino\libraries\Ultrasonic\Ultrasonic".

参考以下:
https://ww2.mathworks.cn/matlabcentral/fileexchange/57898-hc-sr04-add-on-library-for-arduino?s_tid=srchtitle
https://blog.csdn.net/majun1259389904/article/details/54773397

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值