Main Content

arduinolist

List available Arduino hardware

Since R2024a

    Add-On Required: This feature requires the MATLAB Support Package for Arduino Hardware add-on.

    Description

    example

    hwtable = arduinolist returns a table of Arduino® boards connected via USB.

    hwtable = arduinolist(Timeout=tlimit) limits the time to wait for hardware queries to tlimit seconds. The default Timeout value is 20 seconds.

    Examples

    collapse all

    Get a table of available hardware.

    hwtable = arduinolist
    hwtable =
    
      3×4 table
    
         Port       Board             Status                    Libraries          
        ______    __________    __________________    _____________________________
    
        "COM3"    "Mega2560"    "Upgrade required"    {["I2C"    "Servo"    "SPI"]}
        "COM5"    "Uno"         "Setup required"      {["Not available"          ]}
        "COM8"    "MKR1000"     "Ready to connect"    {["I2C"    "SPI"    "Servo"]}

    Output Arguments

    collapse all

    Available Arduino hardware, returned as a table. The table has one row for each board, with the following columns:

    Column NameDescription
    PortSerial COM port device is connected to.
    BoardDevice model name.
    StatusIndication if device is ready to connect, or requires an upgrade or setup.
    LibrariesNames of the libraries being loaded to the IO server running on the board.

    Version History

    Introduced in R2024a