3.33333

3.3 | 6 ratings Rate this file 162 Downloads (last 30 days) File Size: 407 KB File ID: #35641
image thumbnail

Simulink Support Package for Arduino Mega 2560 Hardware (R2012a)

by

 

14 Mar 2012 (Updated )

Simulink block library for creating standalone applications for the Arduino® Mega 2560 platform

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

| Watch this File

File Information
Description

Arduino (www.arduino.cc) is a low-cost open-source electronics prototyping platform based on flexible, easy-to-use hardware and software.
With R2012a, Simulink provides built-in support for prototyping, testing, and running models on Arduino Mega 2560. You can design algorithms in Simulink for control systems and robotics applications, and see them perform with hardware.

To install support for Arduino Mega 2560, type "targetinstaller" in the MATLAB Command Window.

In the Target Installer that opens, do one of the following:
• If you have not downloaded the support package, choose "Internet". Target Installer automatically downloads a support package and installs it.
• If you have already downloaded the support package, choose "Folder". Then specify the location of this support package. Target Installer installs this support package.

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

---------------------
This FileExchange entry is for R2012a support.

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

www.mathworks.com/hardware-support/arduino-simulink.html

For additional Simulink built-in support for hardware, see

www.mathworks.com/products/simulink/simulink-targets
---------------------

Required Products Simulink
MATLAB
MATLAB release MATLAB 7.14 (R2012a)
Other requirements Simulink Support for the Arduino Mega requires a Microsoft Windows platform.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (18)
11 Apr 2014 Dan Lluch

@Marta - this particular entry is for 12a. but http://www.mathworks.com/matlabcentral/fileexchange/40312 is for 13a and beyond. you can read more information here:
www.mathworks.com/hardware-support/arduino-simulink.html

11 Apr 2014 Marta

Does this support package compatible for R2013b?

02 Dec 2013 Dan Lluch

@Phillip - Mac support for this arduino support from simulink was added in R2013b... you can use this entry to initiate installation, but you will need 13b for Mac support.
www.mathworks.com/matlabcentral/fileexchange/40312

01 Dec 2013 Phillip Glau

I'm using 2012a for Mac OS x on 10.8 and when I type
targetinstaller, it pulls up the Target Installer window, but then when I select Internet as the option, I get:

"Select a Target

does not contain a valid support package. Please specify a folder that contains a valid support package and try again."

If I download the submission into my downloads folder and use the 'Folder' option and point it to the folder 'rtt_arduinomega2560_r2012a_v1_0' it also complains and says it is not a valid package.

???

29 Sep 2013 Ashwini Masekar  
15 Jun 2013 addie irawan

Hi guys;

Did anyone knows how big Arduino Mega could support the downloaded simulink program? I hv a quite big simulink program with stateflows and s-function builder blocks. I'm currently want to switch and implementing my model to the hardware. What I understand, the Arduino Simulink block for Arduino Mega is a Target block type NOT like Arduino IO package previously created and suited for Arduino UNO. I also would to know if you guys have experiences on editing Arduino IO package for Arduino Mega used. The Arduino IO package seems saving a lot of memory since the concept is creating virtual port pins of Arduino in SIMULINK blocks NOT downloading the SIMULINK program blocks into the Arduino such as Target block for Arduino Mega version. Please correct me if I mistaken.

Thank you in advance.

08 May 2013 efrianto tanto  
09 Aug 2012 Raja Rout  
03 Aug 2012 pedro

excelente aporte

31 Jul 2012 Twols

Hello!
I'm trying to run the model in external mode on an Arduino Mega 2560 R3. After downloading the compiled model the connection to the target fails (the external mode check box is set): After pressing the Connect to Target Button Simulink crashes. I'm running the 2012b Matlab on a Win7-64bit machine.

12 Jul 2012 Jose Villamizar

good

02 Jul 2012 Jedediah Frey

What is the difference between this package and "Embedded Coder Support Package for Arduino" (http://www.mathworks.com/matlabcentral/fileexchange/30277).

This just appears to have the 'streamlined' installation of targetinstaller.

07 Jun 2012 Dan Lluch

@Heilko and @Ravikanth - please note previous post about where to ask technical questions on this. That is the best option for getting answers quickly...

@Heilko - difficult to tell from only this info.. I suggest to post again on Ansers or contact Technical Support. My guess is you picked the 'folder' option, but that wasn't where you downloaded the File Exchange entry... or you unzipped it already... no need to download it from here first... just run targetinstaller and follow the 'internet' option.

@Ravikanth - We expect that all revs of the 2560 are supported. If you have any issues, please contact Technical Support.

Thanks for the interest and have fun using the new capability!

07 Jun 2012 Ravikanth Ananthoju

Can anyone please help me whether matlab and simulink supports Arduino Mega 2560 R3.....because this is R3 board... so just to make sure whether it supports or not?

Thanks,
Ravi

07 Jun 2012 Heiko

.../arduinouno does not contain a valid support package.
Please specify a folder that contains a valid support package and try again.

What is wrong? Can you help me ?

Thanks,

Heiko

30 Mar 2012 MathWorks Simulink Team

General guidelines:
* Please use this FileExchange page to post general comments and ratings on the support package

* If you have questions about using this support package, post your question at http://www.mathworks.com/matlabcentral/answers (with tag "arduino", and product "simulink")

* If you have an enhancement request or wish to report a possible bug, contact MathWorks Technical Support at
http://www.mathworks.com/support/contact_us/

23 Mar 2012 Nils

Also, does this release have support for access to more (or all) input/output capabilities of the mega board?

23 Mar 2012 Nils

And what is released separately in this case? What can be downloaded here isn't entirely compatible with r2011b, I take it...?

Updates
22 Mar 2012

Updated zip file and title

28 Mar 2012

Updated zip file

16 Jul 2012

* Updated title and description to clarify that support is for Arduino Mega 2560 board

12 Sep 2012

Updated title and description to emphasize that this entry is for R2012a support

20 Sep 2013

updated thumbnail and description

06 Feb 2014

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

26 Feb 2014

Update to fix broken link

Contact us