Hardware Support

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. 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
  • Communicate with an Arduino board over a USB cable or wirelessly over Wi-Fi
  • 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.

Arduino Engineering Kit

Learn important engineering concepts while programming fun Arduino projects with MATLAB and Simulink.

Supported Hardware

Arduino Board Shield Support Releases Supported
Comments
Arduino MKR Zero N R2019b – Current  
Arduino Uno* Y R2014a – Current
 
Arduino Due* Y R2014a – Current
DAC and CAN channels not currently supported.
Arduino Mega 2560* Y R2014a – Current
 
Arduino Leonardo* Y R2015a – Current
 
Arduino Mega ADK* Y R2015a – Current
 
Arduino Micro* N R2015a – Current
 
Arduino Mini*
(ATmega328)
N R2015a – R2018b
Mini with ATmega168 not supported.
Arduino MKR1000* N R2017a – Current
Supports Wi-Fi communication
Arduino MKR1010 N R2019a – Current Supports Wi-Fi communication
Arduino Nano 3.1* N R2015a – Current
Nano 2.X not supported.  Other Nano 3.X not tested but expected to work.
Arduino Pro*
(ATmega328)
N R2015a – R2018b
Pro with ATmega168 not supported.
Arduino Pro Mini
(ATmega328)
N R2015a – Current
Pro Mini with ATmega168 not supported.
Arduino Fio* N R2015a – R2018b
 
Sparkfun Digital Sandbox N R2015a – Current
 
Adafruit Motor Shield V2 R2014a – Current
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.


Related Hardware Support Views: MATLAB, Arduino, Consumer Electronics, Control Systems, I2C ∕ SPI, Internet of Things, MathWorks Supported, MATLAB Product Family, Mechatronics, Power Electronics Control Design, Project-Based Learning, Serial, Support Package Installer Enabled, Test and Measurement

Ready to install?

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

Get support package

Software

Required

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.

Get support package

Hardware

Required

Recommended

Don't see the hardware you're looking for?