This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Adapt Add-ons to New matlabshared.addon.LibraryBase Class

If you have been using the arduinoio.LibraryBase class, follow these steps to adapt your add-ons to the new matlabshared.addon.LibraryBase class:

  1. Inherit your custom add-on class from matlabshared.addon.LibraryBase

    classdef MyAddon < matlabshared.addon.LibraryBase
  2. Add the property Pins to your custom add-on class to continue using it, as this is not included in matlabshared.addon.LibraryBase.

    properties(Access = protected)
          Pins
    end
  3. Change the ArduinoLibraryHeaderFiles property to LibraryHeaderFiles.

            LibraryName = 'ExampleLCD/LCDAddon'
            DependentLibraries = {}
            LibraryHeaderFiles = 'LiquidCrystal/LiquidCrystal.h'
            CppHeaderFile = fullfile(arduinoio.FilePath(mfilename('fullpath')),'src','LCD.h')
            CppClassName = 'LCD'

This ensures that the add-on library is up to date and detected by listArduinoLibraries .

See Also