How to import JRodrigoTech/HCSR04 in arduino library

4 ビュー (過去 30 日間)
Ahmadreza Vatankhah
Ahmadreza Vatankhah 2018 年 8 月 8 日
コメント済み: Madhu Govindarajan 2018 年 8 月 27 日
I get this add-on library from mathwork
And I don’t know how to add jrodrigotech/hcsr04 library to arduino libraries in matlab

回答 (1 件)

Madhu Govindarajan
Madhu Govindarajan 2018 年 8 月 9 日
1. Download the zip file from https://github.com/JRodrigoTech/Ultrasonic-HC-SR04/archive/master.zip 2. Unpackage the zip into local directory and rename the folder to ‘Ultrasonic’. 3. Move the ‘Ultrasonic’ folder into the "libraries" folder inside your Arduino sketchbook folder: On Windows, the default path is "My Documents\Arduino\libraries\" On Mac, the default path is "~/Documents/Arduino/libraries/" On Linux, the default path is "/home/<username>/Arduino/libraries" Then follow the example provided here https://www.mathworks.com/matlabcentral/fileexchange/57898-hc-sr04-add-on-library-for-arduino.
  2 件のコメント
Nalin Das
Nalin Das 2018 年 8 月 25 日
I tried everything from putting the Ultrasonic folder in Documents/Arduino/libraries/ and C:\ProgramData\MATLAB\SupportPackages\R2018a\3P.instrset\arduinoide.instrset\arduino-1.8.1 But none of it is reflecting in the library list ... pls help ASAP
Madhu Govindarajan
Madhu Govindarajan 2018 年 8 月 27 日
When something does not show up on the listArduinoLibraries, it is because they are not on MATLAB's path.
If you downloaded the submission as toolbox
1) Go to MATLAB > Preferences. Here Under MATLAB, Add-Ons check the location and go there from MATLAB Command Window, ex. cd 'C:\Users\mgovinda\MATLAB' in my case. 2) Check if this toolbox is properly installed and the code folder is on MATLAB's path. Ex - 'cd 'C:\Users\mgovinda\MATLAB\Toolboxes\HC-SR04 Add-On Library for Arduino'' 3) If not, feel free to add it to path manually or reinstall.
If you downloaded the submission as zip file 1) Go to the extracted folder in MATLAB and go one level up. 2) Right click on the folder and select Add to Path > Selected Folders and Subfolders.
HTH,
Madhu

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeArduino Hardware についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by