dcmotor
Connection to DC Motor on Arduino MKR Motor Carrier or Nano Motor Carrier
Since R2020a
Add-On Required: This feature requires the MATLAB Support Package for Arduino Hardware add-on.
Description
This object represents a connection to a DC Motor with the specified motor number on an MKR Motor Carrier or Nano Motor Carrier. You can control the DC motor using Object Functions.
Creation
Description
creates a connection to the DC motor at the specified motor number on the MKR Motor
Carrier or Nano Motor Carrier.dcmObj
= dcmotor(mcObj
,motornumber
)
creates a connection to the DC motor at the specified motor number and specified
additional options on the MKR Motor Carrier or Nano Motor Carrier.dcmObj
= dcmotor(mcObj
,motornumber
,Speed
)
Input Arguments
Properties
Object Functions
Use these object functions to create a connection to the DC Motor.
Examples
Version History
Introduced in R2020a
See Also
arduino
| motorCarrier
| pidMotor
| rotaryEncoder
| servo