License

READ THE TERMS AND CONDITIONS OF THIS MATHWORKS LIMITED LICENSE AGREEMENT
(THE "AGREEMENT") CAREFULLY BEFORE ACCESSING THESE MATERIALS (AS DEFINED
BELOW).

THIS AGREEMENT REPRESENTS THE ENTIRE AGREEMENT BETWEEN YOU (THE "LICENSEE")
AND THE MATHWORKS, INC. ("MATHWORKS") CONCERNING THE SOFTWARE AND
DOCUMENTATION MADE AVAILABLE FOR ACCESS HEREUNDER (COLLECTIVELY, THE
"MATERIALS").

BY ACCESSING THESE MATERIALS, YOU ACCEPT THE TERMS OF THIS AGREEMENT.

1. DEFINITIONS.

1.1. "Licensee" means you, whether an individual or an entity, to whom
MathWorks grants the License, and who is responsible for complying with the
contractual obligations of the License, and ensuring that anyone permitted
access to the Materials also complies with such obligations.

1.2. "Documentation" means the user guides, if any, accompanying delivery
of the Materials, as may be updated from time to time, as well as any
reports or other feedback that MathWorks may, in its sole discretion,
provide to Licensee. Documentation may be delivered in printed and/or
online forms, and in one or more languages.

1.3. "Licensor" means any person who, or entity which, grants a license
to MathWorks to redistribute that person's or entity's intellectual
property.

1.5. "Third Party" means any person or legal entity that is not MathWorks
or the Licensee.

2. LICENSE GRANT. MathWorks hereby grants to Licensee, subject to the
terms of this Agreement, a nonexclusive, nontransferable, revocable license
(the "License") to use the Materials internally or for the purpose of
providing to MathWorks engineering feedback on the Materials, as the context
may require. In all cases, the Materials are licensed to you solely for
use in conjunction with MathWorks products and services.

3. LICENSE RESTRICTIONS. The License is subject to the express
restrictions set forth below. Licensee shall not, and shall not permit any
Third Party to:

3.1. modify, or create any derivative work of, any part of the licensed
Materials

3.2. adapt, translate, copy, or convert all or any part of the Materials
in order to create software or other materials, a principal purpose of
which is (a) to perform the same or similar functions as the Materials or
any other technology or materials licensed by MathWorks, or (b) to replace
any component of the Materials or any other technology or materials
licensed by MathWorks;

3.3. rent, lease, or loan the Materials; use the Materials for supporting
Third Parties' use of the Materials, time share the Materials, or provide
service bureau use;

3.4. disassemble, decompile, reverse engineer the Materials or otherwise
attempt to gain access to its method of operation or source code (other
than files provided for convenience in source code form by MathWorks);

3.5. sell, license, sublicense, publish, display, distribute, disseminate,
assign, or otherwise transfer (whether by sale, exchange, lease, gift, or
otherwise) to a Third Party the Materials, any copy or portion thereof, or
any License or other rights thereto, in whole or in part, without MathWorks'
prior written consent;

3.6. alter, remove, or obscure any copyright, trade secret, patent,
trademark, logo, proprietary and/or other legal notices on or in copies of
the Materials;

3.7. use MathWorks' name, trade names, logos, or other trademarks of
MathWorks or any of its affiliates or Licensors in any advertising,
promotional literature or any other material, whether in written,
electronic, or other form, distributed to any Third Party, except in the
form provided by MathWorks, and then solely for purposes of identifying
MathWorks' Materials;

3.8. provide access (directly or indirectly) to the Materials via a web or
network application other than the licensee's internal network;

3.9. copy, make available for copy, or otherwise reproduce the Materials,
in whole or in part, except either (a) as may be required for their
installation into computer memory for the purpose of executing the
Materials in accordance with this Agreement; or (b) to make a reasonable
number of copies solely for back-up purposes provided that any such
permitted copies shall reproduce all copyright, trade secret, patent, logo,
proprietary and/or other legal notices contained in the original copy
obtained from MathWorks; and/or

3.10. republish the Documentation.

4. RETENTION OF RIGHT, TITLE AND INTEREST BY MATHWORKS AND ITS LICENSORS;
CONFIDENTIALITY. The Materials shall at all times remain the property of
MathWorks and/or its Licensors and Licensee shall have no right, title, or
interest therein, except as expressly set forth in this Agreement. The
Materials are a commercially valuable product of MathWorks, the design and
development of which reflect the efforts of skilled development experts and
the investment of considerable time and expense. MathWorks claims and
reserves all rights and benefits afforded under all relevant laws and
regulations. Licensee shall take appropriate action by instruction,
agreement, or otherwise with any persons permitted access to the Materials,
so as to enable Licensee to satisfy its obligations under the terms of this
Agreement. The Materials are proprietary information of MathWorks, and are
protected by copyright law, trade secret law and other applicable law.
Although MathWorks may consider a commercial release of the Materials, it
is under no obligation to do so and MathWorks reserves the right to alter
features, licensing terms, or other characteristics of any such commercial
release.

5. LICENSES FOR THIRD PARTY SOFTWARE. MathWorks has been granted licenses
to distribute certain Third Party software. Certain MathWorks Materials
require the use of Third Party software products that may require a
separate license from such Third Parties to use those Third Party products.
Licensee agrees and acknowledges that, to the extent that the Materials
contain any Third Party software: (i) such Third Party software is provided
on an "as-is", pass-through basis, and as such is provided to Licensee
without warranty, indemnification, support or other representation by
MathWorks; and (ii) MathWorks bears no liability with respect to such Third
Party software.

6. TERM AND TERMINATION. This Agreement shall continue until termination
by MathWorks or Licensee as provided below. Either party may terminate this
Agreement at any time, for any reason, upon written notice to the other
party. Upon termination, Licensee shall promptly return all but archival
copies of the Materials in Licensee's possession or control, or promptly
provide written certification of their destruction.

7. EXPORT CONTROL. The Materials may be subject to U.S. export control
laws or other (U.S. and non-U.S.) governmental export and import laws and
regulations. Notwithstanding any other term of this Agreement or Third
Party agreement, Licensee's rights under this Agreement may not be
exercised by Licensee or any Third Party in violation of such laws and
regulations, nor may this Agreement be transferred to any party where
doing so would result in such a violation. The terms of any limitation on
the use, transfer or re-export of the Materials imposed by MathWorks in any
Destination Control Statement or other document for the purpose of export
control shall prevail over any term in this Agreement. It shall be
Licensee's responsibility to comply with the latest United States or other
governmental export and import regulations.

8. FEDERAL ACQUISITION. This provision applies to all acquisitions of the
Materials and Documentation by, for, or through the federal government of
the United States. By accepting delivery of the Materials or
Documentation, the government hereby agrees that this software or
documentation qualifies as commercial computer software or commercial
computer software documentation as such terms are used or defined in FAR
12.212, DFARS Part 227.72, and DFARS 252.227-7014. Accordingly, the terms
and conditions of this Agreement and only those rights specified in this
Agreement, shall pertain to and govern the use, modification, reproduction,
release, performance, display, and disclosure of the Materials and
Documentation by the federal government (or other entity acquiring for or
through the federal government) and shall supersede any conflicting
contractual terms or conditions. If this License fails to meet the
government's needs or is inconsistent in any respect with federal
procurement law, the government agrees to return the Materials and
Documentation, unused, to MathWorks.

9. FOR EUROPEAN UNION LICENSEES ONLY. Any contractual provisions of this
Agreement contrary to laws implemented under Article 6 of Appendix V of the
European Union Software Directive or to the exceptions provided for in
Article 5(2) and (3) of such Appendix shall be null and void solely to the
extent decompiling, disassembling, or otherwise reverse-engineering of the
Materials is necessary to enable the Licensee to create an independent
program that is interoperable with the Materials or any other permitted
objectives specified by such laws implemented under such directive
(collectively, the "Permitted Objectives"), provided that any such
information gained is used solely for such Permitted Objectives.

10. ASSIGNMENT. Licensee may not assign or otherwise transfer this
Agreement and its rights and obligations hereunder, in whole or in part, by
operation of law or otherwise, without the written consent of MathWorks.
In the case of any permitted assignment or transfer of or under this
Agreement, this Agreement or the relevant provisions shall be binding upon,
and inure to the benefit of, the successors, executors, heirs,
representatives, administrators and assigns of the parties hereto.
MathWorks may charge Licensee an administrative fee for any permitted
assignment.

11. LIMITATION OF LIABILITY. The Materials should not be relied on as the
sole basis to solve a problem or implement a design whose incorrect solution
or implementation could result in injury to person or property. If the
Materials are employed in such a manner, it is at the Licensee's own risk
and MathWorks and its Licensors explicitly disclaim all liability for such
misuse to the extent allowed by law. MathWorks' and its Licensors'
liability for death or personal injury resulting from negligence or for any
other matter in relation to which liability by law cannot be excluded or
limited shall not be excluded or limited. Except as aforesaid, (a) any
other liability of MathWorks and its Licensors (whether in relation to
breach of contract, negligence or otherwise) shall not in total exceed one
hundred dollars ($100.00); and (b) MathWorks and its Licensors shall have
no liability for any indirect or consequential loss (whether foreseeable or
otherwise and including loss of profits, loss of business, loss of
opportunity, and loss of use of any computer hardware or software). Some
states do not allow the exclusion or limitation of incidental or
consequential damages, so the above exclusion or limitation may not apply
to Licensee.

12. DISCLAIMER OF WARRANTIES. The Materials are delivered "as is" and
MathWorks makes and the Licensee receives no additional express or implied
warranties. MathWorks and its Licensors hereby expressly disclaim any and
all other conditions, warranties, or other terms of any kind or nature
concerning the Materials (including, without limitation, any with regard to
infringement, merchantability, quality, accuracy, or fitness for a
particular purpose or Licensee's purpose). MathWorks also expressly
disclaims any warranties that may be implied from usage of trade, course of
dealing, or course of performance. The Materials are provided with all
faults, and the entire risk of satisfactory quality, performance, accuracy,
and effort is with Licensee. MathWorks does not warrant that the Materials
will operate without interruption or be error free. Some states and
countries do not allow limitations on how long an implied warranty lasts,
so the above limitation may not apply to Licensee. Licensee may also have
other rights which vary from state to state and country to country.
Licensee accepts responsibility for its use of the Materials and the
results obtained therefrom.

13. GOVERNING LAW; JURISDICTION. This Agreement shall be interpreted,
enforced and construed and the rights of the parties hereunder governed in
all respects by the laws of the Commonwealth of Massachusetts, United
States of America, without regard to its conflicts of law provisions, and
both parties consent to the jurisdiction of the federal and state courts
located in said Commonwealth and consent to the service of process,
pleadings and notices in connection with any and all actions initiated in
such courts. The parties agree that a final judgment in any such action or
proceeding shall be conclusive and binding and may be enforced in any other
jurisdiction. To the extent any governing law, treaty, or regulation is in
conflict with this Agreement, the conflicting terms of this Agreement shall
be superseded only to the extent necessary by such law, treaty, or
regulation. If any provision of this Agreement shall be otherwise
unlawful, void, or otherwise unenforceable, that provision shall be
enforced to the maximum extent permissible. In either case, the remainder
of this Agreement shall not be affected. The parties agree that the U.N.
Convention on Contracts for the International Sale of Goods shall not apply
to this Agreement. The parties further agree that the Uniform Computer
Information Transactions Act, or any version thereof, adopted by any state,
in any form ("UCITA"), shall not apply to this Agreement. To the extent
that UCITA is applicable, the parties agree to opt out of the
applicability of UCITA pursuant to the Opt-Out provision(s) contained
therein.

14. HEADINGS. The inclusion of headings is for convenience of reference
only and shall not affect the construction or interpretation of this
Agreement.

15. ENTIRE AGREEMENT. This Agreement, together with any additional
license_addendum.txt file included with the Materials, contains the entire
understanding of the parties with regard to the Materials, and may not be
modified or amended except by written instrument, executed by authorized
representatives of MathWorks and Licensee.

MATLAB® Support Package for Arduino® Hardware enables you to use MATLAB to communicate with an Arduino board. You can read and write sensor data through the Arduino and immediately see the results in MATLAB without having to compile.
This support package is functional for R2014a and beyond.

Hi, I have installed this add-on with Matlab2016B and have my Arduino board connected.

A simple command a = arduino() works. But when I restart Matlab and attempt the same, I get the following error message: "You need the MATLAB Arduino support package before you can use this feature. Open Support Package Installer to install support for additional MATLAB hardware.".

I am certain that the package is still installed and I have also verified the same in the Add-On Explorer as well as with the following set of commands:

I can't "Updating server code on board Uno" .My system is OS X and the board is a Uno. Ironically I was using the old version package few minutes ago and it worked pretty good with high speed!!! I was just gonna finish my experiment today and go home! Feels really really frustrated!!!
Please solve this problem, I would be pretty appreciated!

I keep getting an error during installation. It stalls out during "Installing Third-Party Packages...(may take a few minutes). I then get an error screen that says: "Failed to install the third-party software: Arduino software"

I am running Windows 10 and a fully updated R2018a (9.4.0.813654) 64 Bit version of Matlab. Any help would be greatly appreciated!

We've already fixed the issue of not being able to install this support package in R2014a, R2015a and R2015b due to this error "Received fatal alert: protocol_version". Please try installing the support package in MATLAB now and report any other issue through our Technical Support.

@Arpita Agrawal
Hi.
Actually, it is an interesting problem.
I test this package on my friend's computer which also has MATLAB R2018a but does not have Arduino IDE. And it runs smoothly.
I believe this problem maybe rise because my computer had Arduino IDE. Because of that, it comes up with error: "Must specify exactly one sketch file". It can explain like, my Arduino IDE has one sketch file, my MATLAB has another sketch file, and the package counts two sketch files, so it cannot run.
I tried to uninstall Arduino IDE, clear all things related to Arduino IDE, but the package still detects sketch file from somewhere else. So I think the possible solution is I have to recover the whole system and do everything from scratch. But it is my last resort and it is very inconvenient.
Hope there is another way to fix it.

Doesn't seem functional for me or many other people, kind of baffling that this hasn't been repaired yet considering how many people use this. I'm seeing "download failed: Received fatal alert: protocol_version" on matlab 2014a

Hello, I installed the latest revision of the Arduino Hardware package tonight and I am getting an error when attempting to Upload Arduino Server. I have used the Arduino board prior to installing the Hardware Package and am still able to program it through the Arduino IDE. I am running Windows 10 64-bit. I have tried the following potential fixes without any luck
1. Open MATLAB as Administrator
2. Uninstall - Reinstall the Arduino Hardware Package
3. Try multiple boards

I have verified the board is on COM4, the USB Driver is installed, and FTDI is working properly on other FTDI hardware.

Hi. I recieve "Failed to open scketch: C:\Users\Bahar" when I run the following code.

Arduino Mega 2560 detected.
This device is ready for use with MATLAB Support Package for Arduino Hardware. Get started with examples and other documentation.
To use this device with Simulink, install Simulink Support Package for Arduino Hardware.

Sorry for the inconvenience. We just tried it today but we weren't able to reproduce the error you saw. Could you please get in touch with our Technical Support and attach the failure log which you got in the Setup USB Connection step? We will help investigate it further with more information.

Hi
I have installed the Arduino Matlab Support Package for Matlab R2018a and installation was successful, however the Setup USB Connection Configuration Step fails - Reports "Must specify exactly one sketch file" Error.
The Arduino Uno and Mega2560 Boards both work perfectly with Arduino IDE V1.8.5.

The Matlab Setup Process is unable to complete the Proram Test Stage and the a=arduino() function does detect the the correct board and Port but appears to be unable to upload the program test code to the Arduino and only Reports "Must specify exactly one sketch file" Error

Hello everone,
My classmate and I are trying to run an matlab model on an arduino Mega2560.
We are currently working on Matlab2016a and using Simulink librairies.
It work prefectly, but Matlab seems to blind to our Mega.
We tryied to write :
a = aduino('COM4','Mega2560)
But all we get is :"ide.internal.getArduinoIDERootDir"
Can you please give us help?

I am assuming your question is regarding whether you will be able to use this support package to work with an Arduino Uno board. This support package works with the Arduino Uno board.
You can find the list of supported Arduino boards with this support package here: https://in.mathworks.com/hardware-support/arduino-matlab.html

Hi Felix,
I am assuming your question is whether you can use 2 I2C PWM controllers with the support package. You should be able to use i2cdev method to create the I2C object with the PWM controller. If you have any further questions on implementing the required functionality please contact Mathworks Technical Support.
Thanks
Arpita
MATLAB Hardware Team - Mathworks

The error you are seeing seems to be a bug, the pin should be reserved in SS rather than MOSI. We have made a note of it and will work on fixing it in a future release.
Currently, you can create the SPI device first and then use the SS in Digital Output mode and it should work as per your requirements.
Meanwhile, we will look into possibility of reserving the SS pin in Digital Output mode during the SPI device creation in a future release.

Run 'matlabshared.supportpkg.getInstalled' at MATLAB command window and see if the MATLAB Support Package for Arduino Hardware shows up in the result. If it is indeed installed and you are still getting that error, please contact our Customer Support to get further help.

Hi! Very nice support package, but I am having an issue. I am trying to control Arduino Mega 2560 through Matlab and use it to control 11 SPI based digital potentiometers. Since I am only using my Mega 2560 as a Master device, I do not need my PIN 53 (SS) on my Mega 2560. I tried to use PIN 53 as a digital output, when I connect my SPI devices and try to control them through Mega 2560 while PIN 53 is configured as Digital Output, Matlab gives me an error "Board Mega2560, SPI communications require pins D53(MOSI) which is currently in use. To use SPI, configure them to 'SPI'." However, when I am not using PIN 53 at all, everything works fine. Why does Matlab thinks that PIN 53 is MOSI? It is clearly mentioned in Arduino's specifications that PIN 53 is SS, PIN 52 is SCK, PIN 51 is MOSI and PIN 50 is MISO.

Hello MathWorks
I can install the package successfully, but am unable to configure the board
After I select the libraries to be installed on my Arduino Uno, choose the board and port,and press Program, there pops up an error stating, Make sure you choose exactly one sketch.

I tried to click on only one library and tried to program, still the same error persist

Now that i was able to install the packages, when i check to see if the connection is established between Matlab and Arduino, i get this error
"Arduino IDE at folder 'arduino-1.6.13' is corrupt. Open Add‑On Explorer to reinstall MATLAB Support Package for Arduino Hardware."

I am getting the same error code as everyone else. "Arduino IDE at folder 'arduino-1.6.13' is corrupt. Open Add‑On Explorer to reinstall MATLAB Support Package for Arduino Hardware." This issue has clearly been going on since April according to other comments. I uninstalled/reinstalled arduino IDE and the Matlab add-ons multiple times. I even installed the 1.6.13 version of Arduino IDE to see if it would work. Nothing. You need to fix this, I have a school project to do.

Hi Menghan. I have a problem with Matlab support package for arduino hardware. when i try to connect with my arduino MEGA 2560, i see the next error: arduino ide at folder 'C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\arduino-1.6.13' is inaccesible or corrupt

Hi, I tried to launch the IDE directly and I couldn't. So I thought could be a problem in the DEP 'Data execution prevention' protection on Windows and I disabled all the protection by cmd console using admin privilege, but the problem still persist. Maybe if somehow I could use another version of the Arduino IDE..
I submmitted this problem to service request anyway. Thanks for answer

With the MATLAB Arduino Support Package, the communication or data transfer is initiated from MATLAB, meaning Arduino board will get data from MATLAB whenever MATLAB calls it. Feel free to take a look at some of the examples in our Documentation to see if it fits with what you are trying to accomplish.

I have a problem. I try to connect computer to Arduino by using Bluetooth module HC-06. For this task I implemented two methods.
Command arduinosetup doesn't work for library "MATLAB Support Package for Arduino Hardware version 16.2.1". I can't connect computer with Arduino via Bluetooth (HC-06).
When I try to use following commands:
instrhwinfo('Bluetooth','HC-06')
b = Bluetooth('HC-06',1)
fopen(b)
a=arduino('COM4','UNO')
I got following error:
Cannot program board Uno (COM4).
Please make sure the board is
supported and the port and board
type are correct.
Can anybody help me with this?

Hi, i installed matlab R2017a, and i need to use LSM303Exemple in order to read value from an accelerometer: first i write
a = arduino('COM5', 'Mega2560', 'Libraries', 'Pololu/LSM303')
and it's work well then i would like to Create LSM303 device object for LSM303D accelerometer
compass = addon(a, 'Pololu/LSM303')
but it doesn't work: i get this error message:
Cannot auto-detect the device type and SA0 pin state. If using an Arduino Due or an Arduino clone, specify both device
type and pin state
How can I do? please help me, it's very urgent and thanks

how i can fix Arduino IDE at folder 'arduino-1.6.13' is corrupt. Open Add‑On Explorer to reinstall
MATLAB Support Package for Arduino Hardware..
i was ready reinstall it 3 times, but still same. can anybody help me?

Thanks for reporting the issue. However, there are various things that could have caused the installation failure. To better help you, could you create a Service Request to our Customer Support here https://www.mathworks.com/support/contact_us.html? We'd be glad to help you find out a fix.

For some reason, when I'm trying to install the package, the install stops when it it gets to "Downloading Third Party Packages." There is no error number given; I'm simply told to contact technical support. Is there a fix for this problem?

Can someone share the Arduino Hardware Support package for me ? I downloaded it from the official website can not run well. Always prompt an error ：Arduino IDE at folder 'arduino-1.6.13' is inaccessible or corrupt. Thanks . zhouyangoo@foxmail.com

Has it ever worked for you since the support package is installed? If not, could you try a reinstallation? If you are still getting the error after all, please contact our Technical Support for further troubleshoot.

a = arduino('/dev/cu.usbmodem1411','uno', 'traceon', true)
Updating server code on board Uno (/dev/cu.usbmodem1411). Please wait.
First input can not be empty. Expected a non-empty character vector or
a valid file-id.

hi i am trying to install hardware support packages it takes too long and stops. i quit this and retried but it gives me error now. can anyone please help will be very greatful.
Error: The application encountered an unexpected error and needs to close. You may want to try re-installing your product(s). More information can be found at C:\Users\Muhammad\AppData\Local\Temp\mathworks_Muhammad.log

Menghan, I've also run into an issue with the Adafruit motor shield during install, the latest version from Mathworks appears to be 16.1.1. Can you confirm what version fixes the Adafruit motor shield issue?

I was getting this, and fixed it by uninstalling the Arduino environment at C:\Program Files\Arduino, followed by uninstalling the MATLAB for Arduino package. After this I reinstalled the MATLAB for Arduino package, and started the Arduino environment from C:\MATLAB\SupportPackages\R2016A\ardiono-1.6.1\. In the Arduino Preferences, set this as the sketchbook location.

Apparently there can be only one installation of the Arduino environment on the computer without getting all the Arduino path information screwed up.

Reading the Troubleshooting in MATLAB Support Package for Arduino Hardware, in the topic Arduino Connection Failure I found this instructions: a = arduino('COM4','Uno','Trace',true). I typed it and I got this:

please helps me!!!
my problem is: "Cannot program board Uno (COM3). Please make sure the board is supported and the port and board type are correct."
i tried many ways ex: run as adminstration, check COM in device and printer..

Hi i really need this help.I have problems on connecting matlab and arduino. I have checked everything, the info on board and port, the device manager, and i even installed a new arduino. But it always show me like:
delete(instrfindall);
a = arduino('COM3','Mega2560','TraceOn', true) ;

If you are getting the same error, it is probably not related to the Firmata version issue. To help you better and faster, please contact our Technical Support team by following instructions on this page,

Thanks for your reply. Well, I did try re-installing the package and even used a different system. However the same problem persists. I somehow think that it is linked to the firmata. Any tips on how to downgrade the board's firmata to an older version?

Please help me
I am using MATLAB13b, I istalled arduino support package. Its working fine with simulink. But when I tried GUI its giving error. So I typed
a = arduino() on command window its displaying error as follow: Undefined function or variable 'arduino'

I have MATLAB 2016a and installed hardware support for Arduino. However, I got the error as below.
"Cannot program Arduino board Uno (COM3). Please make sure the board is supported and the port and board type are correct"

When I tried the trace the error msg. I got it as below.
* I am using Matlab in German language.
[Verwende die Bibliothek Firmata im Ordner: = 'Use the libraries Firmata in Folder: ]

Please give me some idea what wrong with me. I have been stucked for this problem by the whole day.

Thank you, Menghan, for your feedback. After two minor changes, I have managed to get this working. First, I made sure that Java was updated, and then installed the Java 6 SE Runtime (legacy) to match my Arduino configuration. I can't verify that the Java update was the only trick, because I also installed the Raspberry Pi Matlab support package in between all of this. Finally, by calling the direct address (as you mention), I was able to connect to the board. Another computer without these changes was still receiving the same error. Although it's possible that everything was Java related, my superstitions forced me to install the Raspberry Pi toolkit in the same order for the other machines. I did not systematically test this, but now everything is working. I hope this helps other users in the same boat!
Again, thanks for your help!

I receive the same error as Yusef, below: “Failed to open serial port /dev/tty.usbmodemfa431 to communicate with board Uno. Make sure there is no other MATLAB arduino object for this board. For troubleshooting, see Arduino Hardware Troubleshooting.” I’ve now tried this on three machines (all Mac OS X), with Matlab versions 2015b and 2016a. When trying to access the device using the serial command, I receive the following error: Error using serial/fopen (line 72)
Open failed: Port: /dev/tty.usbmodenfa431 is not available. Available
ports: /dev/tty.Bluetooth-Incoming-Port,
/dev/cu.Bluetooth-Incoming-Port, /dev/tty.usbmodemFA431,
/dev/cu.usbmodemFA431.
Use INSTRFIND to determine if other instrument objects are connected
to the requested device.

I’ve searched extensively for a solution to this problem, and found that it has been persistent for at least a year. For example, there are several unresolved submissions at Matlab Answers about this very issue:

Using the “java.opts” fix described in that document also did not resolve the issue. I’m at a loss here, and would really love to access the Arduino (again…it worked before the switch to the support package when I used to run 2014a). Any advice would be certainly appreciated by many!

I am having the same problem with the others. I am using Arduino Due and running MATLAB 2014a on a Win10 PC. My Arduino board works with IDE. Yet, when I try to "Deploy to Hardware", it says "arm-none-eabi-gcc.exe has stopped working". I wonder if there is some path conflicts or so.

i have problem in installing kinect run time software package,currently i am using matlab2013a.
when i try to download that support package,downloading of the software doesnot completes(its in half way),even when i kept for hours
please help me out

The Firmata library you installed or downloaded in C:\Users\Max\Documents\Arduino\libraries\ is taking precedence over the default shipping Firmata library in C:\MATLAB\SupportPackages\R2015b\arduino-1.6.1\libraries.

Can you move the first Firmata library to another location or rename it temporarily and then try to call arduino again?

Hello Menghan,
when I try to connect Matlab to my arduino i get this:
"Cannot program board Uno (COM4). Please make sure the
board is supported and the port and board type are
correct."
Can you help me?

Thanks for reporting this issue. This happens due to a source file change from Adafruit about a month ago. The solution mentioned in the link should work for all releases. Meanwhile, we are working on updating the support package to fix it.

In file included from C:/Users/Tom/AppData/Local/Temp/ArduinoServer/Dynamic.cpp:1,
from C:/MATLAB/SupportPackages/R2015a/arduinoio/toolbox/matlab/hardware/supportpackages/arduinoio/src/MWArduino.cpp:488:
C:/MATLAB/SupportPackages/R2015a/arduinoio/toolbox/matlab/hardware/supportpackages/arduinoio/+arduinoioaddons/+adafruit/src/MotorShieldV2Base.h:7:37:
error: Adafruit_PWMServoDriver.h: No such file or directory
make: *** [C:/Users/Tom/AppData/Local/Temp/ArduinoServer/MWArduino.cpp.o] Error 1

But now it gets stuck somewhere else when I run your command sadly enough:
C:/MATLAB/SupportPackages/R2015a/arduino-1.5.6-r2/libraries/Adafruit_MotorShield/Adafruit_MotorShield.cpp -o
C:/Users/Tom/AppData/Local/Temp/ArduinoServer/Adafruit_MotorShield.cpp.o
make: *** No rule to make target `C:/Users/Tom/AppData/Local/Temp/ArduinoServer/Adafruit_PWMServoDriver.cpp.o', needed by
`C:/Users/Tom/AppData/Local/Temp/ArduinoServer/ArduinoServer.elf'. Stop.

looks like you know a lot on this, maybe you could help me too?
I am unable to update the motorshieldv2 library to the arduino. However with the arduino IDE it works fine.

When I connect to the Arduino just by a=arduino() it works, also with specifying the com and board type. Moreover it still works if I include the 'servo' library... but when I try uploading the adafruit/motorshieldv2 library it gives me an error: Cannot program board Uno (COM3). Please make sure the board is supported and the port and board type are correct. (by the way the workspace was cleared before launching the last command in the picture below)

I am using Matlab R2015a with windows10 and the hardware support package for arduino is installed.
thanks
Tom

I tried to install arduino support package. Due to some reasons download is getting failed. So i manually downloaded the Arduino-1.6.1-windows.zip IDE file. So I want to know how to install manually with that IDE.

Can you also try this command in MATLAB?
system('C:\MATLAB\SupportPackages\R2015a\arduino-1.5.6-r2\hardware\tools\g++_arm_none_eabi\bin\cs-make -f C:\Users\maciej\AppData\Local\Temp\ArduinoServer\ArduinoServer.mk')

I tried running the command from the Windows command prompt and got no output, no error either, so I figure it compiled with no problems. I also used the "system" command from within Matlab with the same result (got "ans = 0"), no errors.

Hi lays25, something may be conflicting with your path, either system path or MATLAB path. Can you execute the same command in a Windows shell?(from right after Vendor returned error messages to WInterrupts.c.o and make sure it is in one line).

yes, the board works from the Arduino IDE. The USB cable is plugged into the Programming port. I tried downloading Arduino software and updating the drivers but they were supposedly already up to date however I did update the so-called Bossa Program Port after plugging the USB cable into the Native port of the Due.

Nevertheless, it's not working in Matlab, even though I can deploy Simulink models to the board, of course using the Programming port.

This package is awesome because you can either use the Arduinos as in-/output for Simulink sketches or directly run the Simulink sketches on the Arduino (external mode only with Arduino MEGA and DUE). It is just a button to press to achieve all of that, which is essential for Students and other newbies. Also: You don't need MATLAB coder, which is expensive and not available for standard student versions.

(I am using MATLAB 2015a and both external mode on the Mega and DUE worked.)

I am having the exact same issue as Youbin Kim on OSX Yosemite. The latest version of this code looks like it might be corrupted---the zip file cannot unpack. I was able to successfully manually install by downloading a mirror of an older version from here:
http://blog.spitzenpfeil.org/arduino/mirror_released/

I keep getting an error during install. It says it can't unzip the "arduino-1.5.6-r2-macosx.zip" file. I have tried manually unzipping it as well and it doesn't work. I've tried downloading the package and installing separately as well. Help would be appreciated.

I can't install the support packet. I get always the message that I have to log on, when I try to log on, I get always the message "An error has occurred", although the email and the password are correct, do you have any idea what is the reason and what I can do?

Were you able to install the package successfully? We have not seen this issue before. Can you give us a little more information with MATLAB release number? Also, do you have any other support packages installed? Is this during a reinstall or a fresh install?

If you still have the issue, it will also greatly help if you come through MathWorks technical support for us to better help with your problem.

Do you see this error consistently? Sometimes, the Arduino server may not be available, you may try to download the support package at a different time if you have not done so.
If the above does not help, can you please let us know more information including your MATLAB version, your region(which may affect server access and download speed).

The support package cannot be obtained through a regular browser. It can only be downloaded through the Support Package Installer in MATLAB and the installer needs Internet access.

If you have another computer at home or your personal laptop on which MATLAB does have Internet access, you can download the support package there using "Download From Internet" option in the installer. Then, copy the downloaded files into your university's computer, choose "Install From Folder" option and use the path of the folder which contains the files.

Very annoying that this package can only be obtained through Matlab application itself. I'm trying to work with Arduinos and Matlab in my university but Matlab is not allowed to make connection to internet (not allowed by university guidelines), so I have no idea how to get this support package.

We used MATLAB and an Arduino UNO (Ruggediuno) for our process control lab starting in 2013. We were able to build 40 lab kits for ~$50 each and distribute them to students. Below is a link to our source code for the lab.

The lab is featured in the December issue of CACHE news. The article includes a number of lessons learned with regards to improving student experience. It was a positive experience the second year (2014) after we worked out some important details.

Same problem here for me too. I can't properly see a 50 Hz sine wave with this package or with the other ArduinoIO Package(Simulink).
It's really annoying that a capable microprocessor card can't see the waves that has greater frequency than 25 Hz.

The download issue is caused by the fact that Arduino team has changed their download link for the version of IDE we use. The issue has been fixed already. Please try installing the support package again.
Please also feel free to contact our Technical Support for any other technical questions you may have with the support package.

The installer hangs upon trying to download the arduino software.
ERROR: Download failed : Server returned HTTP response code: 404 for URL: http://download.arduino.cc/arduino-1.5-6-r2-windows.zip.
Apparently, the support package installer tries to download a zip file for the 1.5.6-r2 beta release. However, the current beta release is 1.5.8 (11/10/2014), and the arduino download server denies access to earlier betas.

Mathworks states that the Matlab support package is not real time and the loop time can't be less than 40 ms (25 Hz). I'm using an Arduino for a real time application and like to transfer data to the computer to display later. I hope the serial data buffer can catch the data at faster rate.

I tried the Simulink Arduino support package. It doesn't work well in external mode either, especially for Due.