M1 M2 DC Motors
Control speed and direction of DC motor on port M1 or M2
Add-On Required: This feature requires the Simulink Support Package for Arduino Hardware add-on.
Libraries:
Simulink Support Package for Arduino Hardware /
Arduino Motor Carrier
Description
The M1 M2 DC Motors block controls the speed and direction of a DC motor connected to an MKR or Nano Motor Carrier. The input signal determines the power supplied to the motor and the direction of rotation of the motor.
If you simulate a model that contains the M1 M2 DC Motors block without connecting the hardware, the block outputs zeroes. See Block Produces Zeros or Does Nothing in Simulation.
Supported Hardware
You can use the M1 M2 DC Motors block only with MKR and Nano 33 IoT boards.
Ports
Input
Parameters
Version History
Introduced in R2019a