MATLAB Answers

Error connecting Arduino hardware to MATLAB R2018b

8 views (last 30 days)
I installed MATLAb support package for ardunio hardware. When I type a=arduino() in the workspace. I get the error message
>> a= arduino ()
Updating server code on board Mega2560 (/dev/cu.usbmodem14101). This may take a few minutes.
Undefined variable "ide" or class "ide.internal.getArduinoIDE
I'm using Mac by the way. Does anyone know what may be the problem?


Show 2 older comments
Walter Roberson
Walter Roberson on 24 Mar 2019
Try going into Add-Ons -> Get Add-Ons to get the Add-on Explorer, and search there for Arduino, and install MATLAB Support Package for Arduino Hardware.
I suspect you might have installed Simulink Support Package for Arduino Hardware.
Mohamed Elazab
Mohamed Elazab on 24 Mar 2019
I installed both actually. I don't think that's what's causing the error message.
Walter Roberson
Walter Roberson on 24 Mar 2019
Looks like I copied the directory wrong when I posted before
I installed the package this afternoon in response to your question. I do not have the toolbox/targets directory that you mention.

Sign in to comment.

Accepted Answer

Kestas Subacius
Kestas Subacius on 26 Mar 2019
This issue can be resolved by doing a clean re-installation, rather than a regular re-installation, of the "MATLAB Support Package for Arduino Hardware".
Please see the below resource for the steps to do a clean re-installation of a support package:


Sign in to comment.

More Answers (1)

Madhu Govindarajan
Madhu Govindarajan on 25 Mar 2019
Have you tried uninstalling and reinstalling the support package? When installing these support packages if additional terminal windows open do not close them.


Sign in to comment.

Sign in to answer this question.





Translated by