File Exchange

image thumbnail

Simulink Support Package for Arduino Uno and Mega 2560 hardware (R2012b)

version (847 KB) by MathWorks Simulink Team
Simulink block library for creating standalone applications for Arduino Uno and Mega 2560 platforms


Updated 02 Apr 2018

View License

Arduino ( is a low-cost open-source electronics prototyping platform based on flexible, easy-to-use hardware and software.
In R2012b, Simulink provides built-in support for prototyping, testing, and running models on Arduino Uno and Mega 2560. You can design algorithms in Simulink for control systems and robotics applications, and see them perform with hardware.
Note: The Arduino support package for R2012a and R2012b are compatible only with their respective MATLAB versions. Adding this support package with the newer MATLAB versions may cause issues with the installed files.
Note: Do not use the Download Submission button.

1. Open MATLAB.
2. Enter "targetinstaller" at the MATLAB command prompt.
3. When Target Installer opens, choose Internet, and follow the instructions provided.

Simulink support for Arduino® Uno and Mega 2560 includes the following driver blocks:
• Digital Input and Output
• Analog Input and Output
• Serial Receive and Transmit
• Servo Read and Write

For more details about the Simulink Arduino® support , see:

For additional Simulink built-in support for hardware, see

For R2012a support, see:
Arduino Uno -
Arduino Mega 2560 -

Alternatively, type "targetinstaller" at the R2012a MATLAB command prompt and choose Internet.

Notice: Support in R2012a and R2012b will be discontinued soon and will continue for releases 2013a and newer. Please upgrade your MATLAB release to take advantage of updates to the MATLAB & Simulink product families, and the Simulink Support Package for Arduino Hardware:

Comments and Ratings (18)

@Mohammed Al-brham:: This File Exchange entry works for the release specified in the title, R2012b, and will be discontinued soon. The entry you want is the following one, which support releases 2013a and newer:
You can also find detailed information on the hardware catalog page for Arduino Support from Simulink:
And find additional answers about support in previous releases on this MATLAB Answers post:

Can I use it for matlab 2017a?


dgmcik (view profile)

Malik Qaiser

its very good and much helpful.

thanks to all.

The rating still gets 1 star until they fix this, then maybe 2 stars, but they are missing the SPI and ic communication blocks that r2013+ has.

You need to update your target installer. The google code archive has changed addresses.

can't download support file please send us the download link


Carl Olsson

Support for arduino due would be so good..

Md. Ashfaque

Is there any plan of implementing this package for the Arduino Due? The Due is a much better platform and adding support for that would mean I can finally start using them with Simulink. Also, why don't you add some block for I2C and SPI communications. Most sensors and shields for the Arduinos use these serial protocols so this would go a long way in helping users make useful projects.

You can't use this on the older versions due to some limitations.. only from 2012 version onwards.

Flavio Lopez


Shouvik Das

When can we expect a Arduino DUE Support? It would be great to have it soon.


Adrian (view profile)

Do you plan to release a support package for the arduino mini some time soon? Or is there another way to use these simulink library block with the mini board?

Mick Lovell

Same comment as above. I've got 2009a


Arif (view profile)

Is there anyway to use these blocks in old versions like 2011b ?

Thank you


Discontinue notice update.

Support from Simulink for Arduino Hardware in releases 2012a and R2012b will be discontinued soon, and will continue for releases 2013a and newer. This File Exchange entry will be deleted.

Note: The Arduino support package for R2012a and R2012b are compatible only with their respective MATLAB versions. Adding these support packages with the newer MATLAB versions may cause issues with the installed files.

Arduino is archiving old IDE versions in a different server compared to the newer versions. For 12a and 12b, the download links are hardcoded. We recommend upgrading MATLAB to a newer release to avoid this issue in the future.

Update to v2.1 to enable autodownload on non-R3 Arduino Mega 2560 boards

updated thumbnail and description text

Updated description

Updated description

MATLAB Release Compatibility
Created with R2012b
Compatible with any release
Platform Compatibility
Windows macOS Linux

MATLAB Online Live Editor Challenge

View the winning live scripts from faculty and students who participated in the recent challenge.

Learn more

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video