addon
R2026bConnection to add-on device for Arduino hardware
Description
Add-On Required: This feature requires the MATLAB Support Package for Arduino Hardware add-on.
An object created by addon represents a connection to an
add-on device on Arduino® hardware. To create
libraries such as L3G, LSM303, 1–Wire, Capacitive sensor, NeoPixel, and DHT22, use the addon function. These libraries are not part of the MATLAB® Support Package for Arduino Hardware and must be downloaded separately. You can also create your own custom
Arduino libraries as mentioned in Create Custom Arduino Library.
This page is specifically about the 'Adafruit\MotorshieldV2' library
for the motorshieldv2 object, included in the MATLAB Support Package for Arduino Hardware. Attach an Adafruit® Motor Shield V2 to Arduino hardware, and use 'Adafruit\MotorshieldV2' as an input
argument to create a motorshieldv2 object. To create connections to
motors on the shield, use the object functions.
Creation
Syntax
Description
creates a connection to Adafruit Motor Shield V2 connected to the Arduino hardware shield = addon(a,'Adafruit\MotorshieldV2')a.
adds additional options specified by one or more name-value arguments.shield = addon(a,'Adafruit\MotorshieldV2',Name=Value)
Input Arguments
Name-Value Arguments
Properties
Object Functions
To create a connection to a motor on the Adafruit Motor Shield V2, use these object functions.
Examples
Version History
Introduced in R2014b