Number of instances of a resource
count = getResourceCount(arduinoObj, resourceName)
Create a servo object, and get a count of resources.
Create a servo object.
a = arduino(); s = servo (a, 'D2');
Check the current resource count.
arduinoObj = obj.Parent; count = getResourceCount(a,'servo')
count = 1
resourceName— Name of the resource
Name of resource to count, specified as a character vector.
count— Number of resource instances
Number of instances for a given resource, returned as a double.