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.


Get current terminal mode


value = getTerminalMode(arduinoObj, terminal)



value = getTerminalMode(arduinoObj, terminal) returns the current mode of the terminal.


collapse all

Get the mode of terminal 14 on your Arduino® hardware.

arduinoObj = obj.Parent;
value = getTerminalMode(arduinoObj, 14)
value = 

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.

Output Arguments

collapse all

Mode of specified terminal, returned as a character vector. Valid mode values are:


  • 'DigitalInput'

  • 'DigitalOutput'

  • 'AnalogInput'

  • 'PWM'

  • 'I2C'

  • 'Servo'

  • 'Unset'

  • 'SPI'

  • 'Reserved'

  • 'Pullup'

Introduced in R2015b