主要内容

arduinoio.customLibrary.downloadLibrary

R2026b

Install Arduino compatible libraries

Since R2026b

    Description

    libpath = arduinoio.customLibrary.downloadLibrary(libraryName) installs the Arduino® compatible library specified by libraryName and returns the full path to the installed library folder.

    example

    libpath = arduinoio.customLibrary.downloadLibrary(gitURL) installs the library from the GitHub® repository specified by gitURL.

    example

    libpath = arduinoio.customLibrary.downloadLibrary(zipFilePath) installs the library from the ZIP file whose full path is specified by zipFilePath.

    example

    Examples

    collapse all

    Install an Arduino compatible library using the standard library name. For more information on standard library names, see Libraries in the Arduino documentation.

    libpath = arduinoio.customLibrary.downloadLibrary("Adafruit NeoPixel")
    libpath =
    
        'C:\ProgramData\MATLAB\SupportPackages\R2026b\toolbox\matlab\supportpkg\arduinoio\libraries'

    Install an Arduino compatible library from GitHub repository using the repository URL.

    libpath = arduinoio.customLibrary.downloadLibrary("https://github.com/adafruit/Adafruit_NeoPixel")
    libpath =
    
        'C:\ProgramData\MATLAB\SupportPackages\R2026b\toolbox\matlab\supportpkg\arduinoio\libraries'

    Install an Arduino compatible library from a local ZIP file by specifying its full file path.

    libpath = arduinoio.customLibrary.downloadLibrary("C:\Users\test\Downloads\Adafruit_NeoPixel-master.zip")
    libpath =
    
        'C:\ProgramData\MATLAB\SupportPackages\R2026b\toolbox\matlab\supportpkg\arduinoio\libraries'

    Input Arguments

    collapse all

    Name of the Arduino compatible library, specified as a string or character vector. For more information on the standard library names, see Libraries in the Arduino documentation.

    Example: libpath = arduinoio.customLibrary.downloadLibrary("Adafruit NeoPixel")

    Data Types: string | char

    GitHub URL of the repository containing the Arduino compatible library, specified as a string or character vector.

    Example: libpath = arduinoio.customLibrary.downloadLibrary("https://github.com/adafruit/Adafruit_NeoPixel")

    Data Types: string | char

    Full file path to the ZIP file containing the Arduino compatible library, specified as a string or character vector.

    Example: libpath = arduinoio.customLibrary.downloadLibrary("C:\Users\Test\Downloads\Adafruit_NeoPixel-master.zip")

    Data Types: string | char

    Output Arguments

    collapse all

    Full path to the installed library folder, returned as a string or character vector.

    Data Types: string | char

    Version History

    Introduced in R2026b