MATLAB Support for Arduino (aka ArduinoIO Package)
28 Jul 2011
05 Sep 2014)
MATLAB class and Simulink blocks for communicating with an Arduino microcontroller board
% This files installs the MATLAB support package for Arduino (ArduinoIO package).
% Copyright 2011 The MathWorks, Inc.
% look for arduino.m
% make sure we are in the right folder and there are no other arduino.m files
if length(wa) < 1,
msg=' Cannot find arduino.m, please run this file from the folder containing arduino.m';
if length(wa) > 1,
msg=' There is at least another arduino.m file in the path, the installation will go on but it is strongly suggested to delete any other version before using this one';
% get the main arduino folder
% Add target directories and save the updated path
disp(' Arduino folders added to the path');
result = savepath;
nl = char(10);
msg = [' Unable to save updated MATLAB path (<a href="http://www.mathworks.com/support/solutions/en/data/1-9574H9/index.html?solution=1-9574H9">why?</a>)' nl ...
' On Windows, exit MATLAB, right-click on the MATLAB icon, select "Run as administrator", and re-run install_arduino.m' nl ...
' On Linux, exit MATLAB, issue a command like this: sudo chmod 777 usr/local/matlab/R2011a/toolbox/local/pathdef.m' nl ...
' (depending on where MATLAB is installed), and then re open MATLAB and re-run install_arduino.m' nl ...
disp(' Saved updated MATLAB path');
clear wa ap result nl msg