servo
Connection to servo motor on Arduino or ESP32 hardware
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
Arduino® or ESP32 hardware. Attach a servo motor to the appropriate pins on the
Arduino or ESP32 hardware. Create a servo
object using the
servo
function. You can read from and write to the servo motor in
MATLAB® using object functions.
Note
This object is different from servo
, which is for a servo motor
connected to an Adafruit® Motor Shield V2 on the Arduino hardware.
Creation
Description
Input Arguments
Properties
Object Functions
Use object functions to read from and write to your servo motor.
readPosition | Read servo motor position |
writePosition | Write position of servo motor |
Examples
Version History
Introduced in R2014b