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.

isTerminalAnalog

Check if terminal can be used as an analog pin

Syntax

result = isTerminalAnalog(arduinoObj, terminal)

Description

example

result = isTerminalAnalog(arduinoObj, terminal) checks to see if the specified terminal on the Arduino® board can be used as an analog pin.

Examples

collapse all

Check if terminal 14, pin 'A0', on your Arduino Uno device can be used as an analog pin.

arduinoObj = obj.Parent
result = isTerminalAnalog(obj, 14)
result = 
1

Note

Pin 14 on an Arduino Uno device is an analog output pin and returns 1.

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. For more information on terminal and pin numbers, see Physical Terminals and Pin Numbers.

Output Arguments

collapse all

Arduino hardware terminal type, returned as a boolean. Returns true if terminal is analog

Introduced in R2015b