3.44444

3.4 | 10 ratings Rate this file 188 Downloads (last 30 days) File Size: 391 KB File ID: #35639
image thumbnail

Simulink Support Package for Arduino Uno Hardware (R2012a)

by

 

14 Mar 2012 (Updated )

Simulink block library for creating standalone applications for the Arduino® Uno 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 Uno. You can design algorithms in Simulink for control systems and robotics applications, and see them perform with hardware.

To install support for Arduino Uno, 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® Uno 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
---------------------

Acknowledgements

This file inspired Autonomous 4 Wheel Robot Light Tracker Arduino Mega 2560.

Required Products Simulink
MATLAB
MATLAB release MATLAB 7.14 (R2012a)
Other requirements Simulink Support for the Arduino Uno 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 (33)
22 May 2014 Gerald

Also this is for Matlab 2012

22 May 2014 MathWorks Simulink Team

@ Gerald - from your message I'm guessing you just downloaded, unzipped, and then opened up some model library. If that is correct, then some installation steps didn't happen... please note the instructions in this submission (this submission and instructions valid for 12a)

To install support for Arduino Uno, 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.

If you have further troubles - please feel free to contact Technical Support and we can get you up and running.

22 May 2014 Gerald

I just downloaded the arduino uno support package. I opened the simulink box feature and all the boxes are in read. Can you help me?

21 Jan 2014 Stas Diadechko

Excuse me, I have a problem(does not work analog and digital inputs in model of Simulink(Arduino)...constantly shows "0" on Scope( What can I do ??

15 Nov 2013 Dan Lluch

@ Kyler - Mac support for Arduino was added in 13b - if you have 13b, open up the .mlpkginstall file from this submission in your Mac MATLAB session - http://www.mathworks.com/matlabcentral/fileexchange/40312

14 Nov 2013 Kyler

No support for Mac OSX/Linux.

20 Oct 2013 kit  
20 Oct 2013 kit  
26 Sep 2013 fox tan

@phil--please read below you can get help . http://www.mathworks.com/matlabcentral/fileexchange/39354-device-drivers
http://www.mathworks.cn/matlabcentral/fileexchange/30277-embedded-coder-support-package-for-arduino

19 Jun 2013 Omar Perez

I'm using a digital input block in an arduino uno, I just get zeros from the output of the block, anyone has a solution for this issue?

21 Mar 2013 Nur A'in

how do i use this package? i can't get the exact library for arduino uno. i need step by step installation procedure, please. & one more thing, targetinstaller do not work in my matlab. i'm using 2010 version. but since the 2012 version user also obtain same problem with me. why?

11 Mar 2013 phil

great, how do i write custom driver blocks for this?

i have followed the guide by campa and this doesnt seem to work...any ideas?

29 Oct 2012 Sagar Mody

Referring to my earlier comment on being unable to open 'targetinstaller'---- Reinstalling R2012a did the trick! It works with the automatic download option from the internet.

Thanks

29 Oct 2012 Sagar Mody

When I type "targetinstaller" at the MATLAB prompt, I receive an "Undefined function or variable 'targetinstaller'." error message.

I looked in the help, and it mentions an alternate method: "open a Simulink model and select Tools > Run on Target Hardware > Install/Update Support Package..." Doing this also gives an error: 'Reference to non-existant field 'Folder'' and 'Invalid option for regexprep'

I am running R2012a 32-bit, with Simulink (and Simulink Coder), on Windows 7 64-bit Enterprise.

01 Sep 2012 saurabh_kumar  
09 Aug 2012 klob

Is it possible two send two signals from arduino to simulink throught this arduino target?

30 Jul 2012 eng Moustafa M.Lotfy

Iuse matlab R2008a ,and Iwant to toolbox of
the arduino chip UNO

18 Jul 2012 Wolf

Without sources this package is pointless for me. Can't learn from it an use it for other platforms.

15 Jul 2012 Ermanno

Finally rapid prototyping with Arduino!
This library works with Arduino 2009 (or other versions like nano and fio)?
Can I use all the blocks of other libraries or is there some limitations for embedding code?

29 Jun 2012 Michael McAvoy

I am attempting to install this package. When I type "targetinstaller" at the MATLAB prompt, I receive an "Undefined function or variable 'targetinstaller'." error message.

I looked in the help, and it mentions an alternate method: "open a Simulink model and select Tools > Run on Target Hardware > Install/Update Support Package..." However, from a Simulink model window, the Tools menu does not contain "Run on Target Hardware".

I am running R2012a 64-bit, with Simulink (and Simulink Coder), on Windows 7. Was there an installation option I missed?

11 May 2012 uluc hatip

Thank you for your help Gautam. I downloaded r2012a and i can drive servo. But i have a problem too. I am trying to drive two servo in same time according to my matlab calculations ''done image processing which give out the angle data for two motor''. I can not drive two motor same time and how can i send my data to similink model.

11 May 2012 Gautam Vallabha

uluc: This support packages requires R2012a and Simulink. If you have these, type "targetinstaller" at the command line and follow the instructions (the support package will be downloaded automatically).

11 May 2012 uluc hatip

is it work on r2010b?
And how can i download this on matlab.
I try every thing but can not download it.

07 May 2012 Robert White

This is great and works very well in R2012A.

One thing that would be helpful is access to the interrupts; I tried to use a triggered subsystem but was unsuccessful. I'm not sure the right way to use interrupts in a simulink model... any advice for how to get this to work with Arduino would be great; my particular application is reading quadrature encoders from a motor. In Processing I do this using the interrupts but so far haven't figured out how to do this in simulink.

06 May 2012 Gautam Vallabha

Manas, targetinstaller and associated support packages are new features in R2012a. They are not supported in earlier releases.

05 May 2012 Manas

Hi, does this support earlier versions of matlab/simulink at all? I am trying to run the targetinstaller on R2010a,but its failing. Any workaround?

26 Apr 2012 Gautam Vallabha

@ceverus33 question answered at http://www.mathworks.com/matlabcentral/answers/35538

15 Apr 2012 cerverus33

What's the diference with the file "Embedded Coder Support Package for Arduino"? I'm a little confuse about it

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/

30 Mar 2012 MathWorks Simulink Team

Stefan: This package does not require Embedded Coder. It only requires Simulink.

Konstantin: It is not open source as it uses proprietary technology to work with base Simulink. If you want to see how an Arduino target can be created with published interfaces, see http://www.mathworks.com/matlabcentral/fileexchange/30277

Roger: Please submit enhancement requests through MathWorks Technical Support (http://www.mathworks.com/support/contact_us/)

29 Mar 2012 Stefan Disch

Is it correct, that this package no longer requires the Embedded Coder Toolbox?

28 Mar 2012 Konstantin Volodin

why this package is not open source?

28 Mar 2012 Roger

Have you considered:
a) access to Uno's timers
b) ability to set PWM frequency
c) interrupt routines

Updates
22 Mar 2012

Updated zipe file and title

28 Mar 2012

Updated zip file

12 Sep 2012

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

20 Sep 2013

updated thumbnail and description

Contact us