Accelerating the pace of engineering and science

Arduino Support from MATLAB

Connect to and control Arduino inputs and outputs from MATLAB

Capabilities and Features

With MATLAB® Support Package for Arduino® Hardware, you can use MATLAB to interactively communicate with an Arduino board over a USB cable. The package enables you to perform tasks such as:
  • Acquire analog and digital sensor data from your Arduino board
  • Control other devices with digital and PWM outputs
  • Drive DC, servo, and stepper motors (also supports Adafruit Motor Shield)
  • Access peripheral devices and sensors connected over I2C or SPI
  • Build custom add-ons to interface with additional hardware and software libraries

Because MATLAB is a high level interpreted language, you can see results from I/O instructions immediately, without compiling. MATLAB includes thousands of built-in math, engineering, and plotting functions that you can use to quickly analyze and visualize data collected from your Arduino.

Learn more about Arduino programming with MATLAB and Simulink.

Supported Hardware

Arduino Board Shield Support Comments
Arduino Uno* Y  
Arduino Due* Y DAC and CAN channels not currently supported.
Arduino Mega 2560* Y  
Arduino Leonardo* Y  
Arduino Mega ADK* Y  
Arduino Micro* N  
Arduino Mini*
(ATmega328)
N Mini with ATmega168 not supported.
Arduino Nano 3.1* N Nano 2.X not supported.  Other Nano 3.X not tested but expected to work.
Arduino Pro*
(ATmega328)
N Pro with ATmega168 not supported.
Arduino Pro Mini
(ATmega328)
N Pro Mini with ATmega168 not supported.
Arduino Fio* N  
Sparkfun Digital Sandbox N  
Adafruit Motor Shield V2 See Shield Support column for compatibility.
*Also supported in Simulink Support Package for Arduino Hardware
Note: In addition to the official Arduino hardware listed above, we have also tested our support package on the following Arduino-compatible devices: Sparkfun Redboard, Sainsmart Uno, Sainsmart Mega 2560. Other devices compatible with the boards listed above are expected to work, but are not tested.

 

Platform and Release Support

Available on 64-bit Microsoft® Windows®, 64-bit Mac OS, and 64-bit Linux®.

This support package is available for R2014a and later releases. Learn more about Arduino support from MATLAB and Simulink across releases.

Ready to install?

Before installing the support package, confirm you have the correct setup. View system requirements and installation options.

MathWorks Requirements

Software

Required

Also supported in student and home software.

Recommended

Support Package

Required

Support Package Installer installs this support package and all required third-party software. To start the installer, go to the MATLAB toolstrip and click Add-Ons > Get Hardware Support Packages. For more information, read the documentation.

Third-Party Requirements

Hardware

Required

Recommended

Request Hardware Support