Adapt Add-ons to New matlabshared.addon.LibraryBase Class
R2026bIf you have been using the arduinoio.LibraryBase class, follow these
steps to adapt your library to the new matlabshared.addon.LibraryBase class:
Inherit your custom Arduino library class from
matlabshared.addon.LibraryBaseclassdef LCDAddon < matlabshared.addon.LibraryBaseAdd the property
Pinsto your custom Arduino library MATLAB class to continue using it, as this is not included inmatlabshared.addon.LibraryBase.properties(Access = protected) Pins endChange the
ArduinoLibraryHeaderFilesproperty toLibraryHeaderFiles.LibraryName = 'LCDAddonFolder/LCDAddon' DependentLibraries = {} LibraryHeaderFiles = 'LiquidCrystal/LiquidCrystal.h' CppHeaderFile = fullfile(arduinoio.FilePath(mfilename('fullpath')),'src',LCDAddon.h') CppClassName = 'LCDAddon'
listArduinoLibraries.