Main Content

getPinsFromTerminals

Get pin numbers from terminal

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

Description

pins = getPinsFromTerminals(arduinoObj, terminals) retrieves pin numbers for the specified terminal.

example

Examples

collapse all

Get pin numbers from terminals 2, 3, 4 on your Arduino® hardware.

arduinoObj = obj.Parent;
pins = getPinsFromTerminals(obj, [2 3 4])
pins =

{'D2', 'D3', 'D4'}

Input Arguments

collapse all

Arduino object, specified as an object that is an internal variable called from within classes that derive from matlabshared.addon.LibraryBase.

Terminal number on Arduino hardware, specified as a double or an array of doubles.

Output Arguments

collapse all

Pins from specified terminals, returned as a character vector or cell array of character vectors. For more information on terminal and pin numbers, see Physical Terminals and Pin Numbers.

Version History

Introduced in R2015b