setSharedResourceProperty

Set shared resource property

Syntax

setSharedResourceProperty(arduinoObj, resourceName, propertyName, propertyValue)

Description

example

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

Examples

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