Main Content

getTerminalMode

Get current terminal mode

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

Description

example

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

Examples

collapse all

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

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

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:

include:

  • 'DigitalInput'

  • 'DigitalOutput'

  • 'AnalogInput'

  • 'PWM'

  • 'I2C'

  • 'Servo'

  • 'Unset'

  • 'SPI'

  • 'Reserved'

  • 'Pullup'

Version History

Introduced in R2015b