Azzera filtri
Azzera filtri

Where do I install third-pary libraries?

36 visualizzazioni (ultimi 30 giorni)
Jana
Jana il 6 Lug 2024 alle 7:57
Commentato: Jana il 8 Lug 2024 alle 15:37
I've written a custom add-on library, that includes the 'Stepper.h' library from Arduino. I have definitely downloaded and installed the Arduino library and can access it from the Arduino IDE just fine. However, when I try running my code in Matlab, I get the following error:
"The Arduino source 'Stepper.h' for libraries 'StepperL298N/Stepper_L298N' cannot be found. Install the third party library source first and try again."
I know where the library is and have added the path manually, but will still get he same error. When I enter >>fullfile(arduinoio.CLIRoot, 'user','libraries') to find out where to move the library so that Matlab can find it, I get the following error:
"Unable to resolve the name 'arduinoio.CLIRoot'"
Can someone tell me how to resolve this?

Risposta accettata

surya venu
surya venu il 8 Lug 2024 alle 6:10
Hi,
It looks like you're encountering an issue with integrating a custom Arduino library with MATLAB. Here are some steps you can follow to resolve this:
  • First, ensure that you have the "MATLAB Support Package for Arduino Hardware" installed. You can install it using the following link: https://www.mathworks.com/matlabcentral/fileexchange/47522-matlab-support-package-for-arduino-hardware or through MATLAB "Add-Ons".
  • MATLAB uses a specific directory structure to locate Arduino libraries. You need to place your custom library in the correct directory. Typically, the Arduino libraries for MATLAB are located in: C:\ProgramData\MATLAB\SupportPackages\R2024a\aCLI\user\libraries
  • Follow the same steps that you used to copy the library in the path given.
Hope it helps.
  1 Commento
Jana
Jana il 8 Lug 2024 alle 15:37
"C:\ProgramData\MATLAB\SupportPackages\R2024a\aCLI\user\libraries"
Thank you, that is exactly what I was looking for!

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange

Prodotti


Release

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by