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.


Set shared resource property


setSharedResourceProperty(arduinoObj, resourceName, propertyName, propertyValue)



setSharedResourceProperty(arduinoObj, resourceName, propertyName, propertyValue) sets the specified property of all objects of the given resource to a specified value.


collapse all

Set the mode of all SPI devices to 1.

arduinoObj = obj.Parent; 
setSharedResourceProperty(arduinoObj, 'spidev', 'Mode', 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.

Name of shared resource, specified as a character vector.

Specify optional comma-separated pairs of propertyName, propertyValue arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: setSharedResourceProperty (arduinoObj, 'spidev', 'Mode', 1);

Introduced in R2015b