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.

getTerminalsFromPins

Get terminal numbers from pins

Syntax

terminals = getTerminalsFromPins(arduinoObj, pins)

Description

example

terminals = getTerminalsFromPins(arduinoObj, pins) returns terminal numbers for the specified pins.

Examples

collapse all

Get terminal numbers from pins 'D2', 'A0' on your Arduino® Uno board.

arduinoObj = obj.Parent
terminals = getTerminalsFromPins(a, {'D2', 'A0'})
terminals =

2 14

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.

Pins on Arduino hardware, specified as a character vector or a cell array of character vectors.

Output Arguments

collapse all

Terminal number for specified pins on Arduino hardware, returned as a double or an array of doubles. For more information on terminal and pin numbers, see Physical Terminals and Pin Numbers.

Introduced in R2015b