Main Content

isTerminalAnalog

Check if terminal can be used as an analog pin

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

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

Version History

Introduced in R2015b