File Exchange

image thumbnail


version 1.1 (3.13 MB) by MathWorks Maker Team
MATLAB and Simulink support for hardware components used in the Arduino Engineering Kit.


Updated 17 Sep 2019

View License

Note: This version is for MATLAB release R2019a and later.
If you are using MATLAB R2018b, use this version:
and if you are using MATLAB R2018a, use this version here:

This package includes MATLAB and Simulink files that allow users to communicate with and control the sensors and actuators used in the Arduino Engineering Kit, most of which are connected through the MKR Motor Carrier. This includes:
• DC motor – control up to 4 DC motors simultaneously
• Servo motor – control up to 8 servo motors simultaneously
• Encoder – read up to 2 encoders simultaneously
• Tachometer – read rotational speed from the hall sensor on the motorcycle’s inertia wheel
• BNO055 IMU sensor – read from the accelerometer, magnetometer, and gyroscope
• Ultrasonic sensor – measure the distance to an object
• LiPo Battery – read the battery voltage

Examples are included to demonstrate how to use the MATLAB functions and Simulink blocks included in this package.

Learn more about the Arduino Engineering Kit at

Important notes:
1) After installing this toolbox, type the following command in MATLAB to open the ReadMe
>> edit ArduinoKitHardwareSupportReadMe.txt
2) Be sure to follow the steps in this file, as it provides instructions on downloading the Arduino library for the MKR Motor Carrier. This library is required for some of the functionality to work.

Cite As

MathWorks Maker Team (2020). Arduino_Engineering_Kit_Hardware_Support_19a_and_19b (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (6)

James Hill

This is Wrong! This is the wrong version of MKRMotorCarrier and has been wrong forever!

To install the library - 1) Download the zip file from <<---------------- Do not install this!!!


What you want to download and install is:

Update library to 1.0.5 -----> this is the latest version

Now a new problem appear when i create a diagram with BNO055 at deployment it crash with the message "File "MATLAB" with symbols of the applicatio running on target hardware not found. If the required name is different from the transport layer protocol defaut use the ExtModeMexArgs parameeter to specify the file.

Hello, i have a problem with the imu. It works fine with "MKRIMU" examples in ide library but only send zero-zero-zero in simulink. The motorcarrier library is correctly detected but there is no mention of the MKRIMU library in listArduinoLIbraries. Please Help

The mkr motorshield library is properly installed and detected.

Alex Lan



I received an error when running arduinosetup in MATLAB "fatal error: MKRMotorCarrier.h: No such file or directory". Turned out I needed to install the MKRMotorCarrier library in my Arduino IDE, in Tools...Manage Libraries...




1) Updating the title to include reference to R2019b
2) Updating the readme.txt to include instructions for R2019b, as they are slightly different


Updating the documentation file to include note about ultrasonic sensor


Updating MATLAB Release Compatibility

MATLAB Release Compatibility
Created with R2019a
Compatible with R2019a to any release
Platform Compatibility
Windows macOS Linux