Arduino Support from MATLAB

Student-priced microcontroller board for introducing electrical engineering, motor control, and mechatronics

MATLAB Support Package for Arduino hardware enables you to use MATLAB® to communicate with the Arduino® board over a USB cable. This package is based on a server program running on the board, which listens to commands arriving via serial port, executes the commands, and, if needed, returns a result. This approach helps you:

  • Start programming right away without any additional toolboxes.
  • Work in the MATLAB for interactive development and debugging.
  • Interactively develop programs to acquire analog and digital data, and to control DC, servo, and stepper motors.
  • Access peripheral devices and sensors connected over I2C or SPI.
  • Run control loops at up to 25 Hz (not real time).
  • Introduce mechatronics, signal processing, and electronics concepts in classroom labs.

This support package supports Arduino Uno, Arduino Mega 2560 and Arduino Due hardware.

Simulink Support

This MATLAB support package does not provide Simulink blocks. If you would like this feature, you can use the legacy MATLAB and Simulink Support for Arduino, which does include Simulink blocks that perform similar capabilities. Please click Request Hardware Support and let us know that, in the future, you would like this capability to be built into the support.

Alternatively, you may directly and automatically program the Arduino from Simulink algorithms by using the Simulink Support for Arduino Hardware.

Platform and Release Support

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

This support package is avalable for R2014a and higher. It is recommended that you use the latest MATLAB release. However, for R2013b and earlier, please download the following File Exchange submission to add support: MATLAB and Simulink Support for Arduino.

Ready to install?

MathWorks Requirements

Software

Required

Supported in student and home software.

Recommended

Support Package

Required

Support Package Installer installs this support package. 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