Arduino support from MATLAB and Simulink across releases

5 views (last 30 days)
What are all the different ways I can use Arduino with MathWorks products? Which of these approaches is possible on the release I’m using? Which are officially supported by MathWorks?  How can I decide which one I should be using?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 19 Apr 2021
Edited: MathWorks Support Team on 19 Apr 2021
Arduino hardware can be connected to MATLAB and Simulink in numerous ways. This article describes the differences between the most popular ways of using Arduino hardware with MathWorks software. The latest support is described at https://www.mathworks.com/discovery/arduino-programming-matlab-simulink.html.
Whenever possible, it is recommended to use the
or the
. These solutions are authored by MathWorks development and will be maintained and enhanced over time. If you require any features that are not provided in these offerings, please
to help prioritize future enhancements.
1. MATLAB Support Package for Arduino Hardware
Directly stream real world inputs and outputs between an Arduino and a computer running MATLAB. Contains only MATLAB functions, not Simulink blocks.  All computations occur in MATLAB on a desktop computer, which is connected to the Arduino over serial. Does not support the ability to program the Arduino for standalone execution. Authored by MathWorks development and will be enhanced over time.
Release Compatibility: R2014a and later
2. Simulink Support Package for Arduino Hardware
Embed algorithms developed in Simulink onto an Arduino device for standalone execution. Simulink models run locally on the device. On some devices, data can be sent back to Simulink when running in External mode. MATLAB code can be included by using a MATLAB Function Block. Authored by MathWorks development and will be enhanced over time.
Release Compatibility: R2013a and later
Support in R2012a and R2012b is discontinued as of September 2018. Please 
 release to take advantage of updates to the MATLAB & Simulink product families, and the Simulink Support Package for Arduino Hardware.
Web Page: 
3. Legacy MATLAB and Simulink Support for Arduino Hardware
Directly stream real world inputs and outputs between an Arduino and a computer running MATLAB and Simulink. Includes both MATLAB functions and Simulink blocks. Interactive communication with a Simulink model running in Normal mode. Provides support for encoders. Does not support programming board for standalone execution. Not maintained or tested by MathWorks.
Release Compatibility: R2011a and later
4. Embedded Coder Target for Arduino
Custom Embedded Coder target that uses Arduino as the platform. Requires Simulink and Embedded Coder. Provides access to more code generation optimization options and access to the auto-generated code that is used to program the board. Supports Processor-in-the-Loop (PIL) mode. Custom Target can be modified for other microprocessors. Not maintained or tested by MathWorks.
Release Compatibility: R2013b and later

More Answers (1)

Pradeep KS
Pradeep KS on 20 Jun 2016
Edited: MathWorks Support Team on 19 Apr 2021

Products


Release

R2015b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!