DocumentationHelp Center
Validate that pin supports specific functionality
validatePin(arduinoObj, pin, type)
example
validatePin(arduinoObj, pin, type) validates specific functionality on the pin and throws an error if not supported.
arduinoObj
pin
type
collapse all
Check if pin D12 supports SPI functionality on the Arduino® Uno hardware.
D12
arduinoObj = obj.Parent; validatePin(arduinoObj,'D12','SPI')
Only pins A4 and A5 support I2C type, the function returns an error for unsupported pins
A4
A5
arduinoObj = obj.Parent; validatePin(arduinoObj,'A4,'I2C')
Arduino object, specified as an object that is an internal variable called from within classes that derive from matlabshared.addon.LibraryBase.
matlabshared.addon.LibraryBase
Pin on Arduino hardware, specified as a character vector.
Pin type on Arduino hardware, specified as a character vector. Valid type values are:
'I2C'
'SPI'
'PWM'
'Servo'
'analog'
'digital'
getPinAlias
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office