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
  • Read and write CAN Messages with MCP2515 based CAN-Bus shields through supported Arduino boards

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.

Rasberry Pi Zero W

Arduino Engineering Kit

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

Supported Hardware

Board Shield Support Releases Supported
Comments
Arduino MKR Zero CAN, MC R2019b – Current  
Arduino Uno* MSV2, CAN R2014a – Current
 
Arduino Due* MSV2, CAN R2014a – Current
DAC and CAN channels not currently supported.
Arduino Mega 2560* MSV2, CAN R2014a – Current
 
Arduino Leonardo* MSV2, CAN R2015a – Current
 
Arduino Mega ADK* MSV2, CAN R2015a – Current
 
Arduino Micro* N R2015a – Current
 
Arduino Mini*
(ATmega328)
N R2015a – R2018b
Mini with ATmega168 not supported.
Arduino MKR1000* CAN, MC R2017a – Current
Supports Wi-Fi communication
Arduino MKR1010 CAN, MC 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
 
Arduino Nano 33 IoT MC R2020a – Current    
Arduino Nano 33 BLE N R2021a – Current    
Arduino Nano 33 BLE Sense N R2021a – Current  
Shield Support Releases Supported
Adafruit Motor Shield V2 (MSV2) R2014a – Current
Arduino MCP2515 CAN bus module (CAN) R2020a – Current
Arduino MKR CAN Shield R2020a – Current
Sparkfun CAN-BUS Shield R2020a – Current
Arduino MKR Motor Carrier (MC) R2020a – Current
Arduino Nano Motor Carrier (MC) R2020a – Current
*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.

Note: For shield support, MC refers to the MKR Motor Carrier for the MKR boards, and the Nano Motor Carrier for the Arduino Nano 33 IoT.

Ask a question or share your files with the MATLAB community.