Custom Arduino Library Issues

Custom Library Class Not Detected

If the MATLAB® class of your custom library is not detected by listArduinoLibraries, you are unable to create an arduino object with the new custom library. To overcome this issue, try these steps:

  1. Make sure that the folder with the custom library is added to the MATLAB path.

  2. Run the following commands:

    1. Clear all classes.

      clear classes

    2. Rehash toolbox cache.

      rehash toolboxcache

    Then try to list available libraries,

    lib = listArduinoLibraries();

After defining the required properties in the custom class, try to instantiate the class directly to check if the class is properly recognized by MATLAB. This action ensures that there is no syntax error in the class.