servo
Connection to servo motor on Adafruit Motor Shield V2 for Arduino
Add-On Required: This feature requires the MATLAB Support Package for Arduino Hardware add-on.
Description
A servo
object represents a connection to a servo motor on an
Adafruit® Motor Shield V2 connected to Arduino® hardware. Attach a motor shield to the Arduino hardware, and connect a servo motor to the appropriate pins on the motor shield.
Create a motor shield object using the addon
function, and create a
servo
object using the servo
function. You can control
your servo motor in MATLAB® using the object functions.
Note
This object is different from servo
, which is for a servo motor directly
connected to pins on the Arduino hardware.
Creation
Description
Input Arguments
Properties
Object Functions
Use these object functions to control your servo motor.
readPosition | Read position from servo motor connected to Adafruit Motor Shield |
writePosition | Write position to servo motor connected to Adafruit Motor Shield |
Examples
Version History
Introduced in R2014b