Reference   Language | Libraries | Comparison | Changes

MKRMotorCarrier library

This library allows you to use the MKR Motor carrier. The shield supports micro servo motors, dc motors and dc motors with encoder. This library, therefore, has functions and creates objects to support such hardware. You don't need to initiate any objects manually, they are automatically created when you include "MKRMotorShield.h" or "MKRMotorCarrier.h".

To use this library
#include <MKRMotorCarrier.h>

The objects created are:

  • servo1, servo2, servo3 and servo4 for micro servo motor
  • M1, M2, M3, and M4 for dc motors
  • encoder1 and encoder2
  • pid1 and pid2

The objects should be grouped as follows:

  • pid1 - M1 - encoder1
  • pid2 - M2 - encoder2


Last revision 2019/12/25 by SM
Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.