Error connecting Arduino hardware to MATLAB R2018b

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?

댓글 수: 5

I do not find any reference to that in the code. I find reference to ide.internal.getArduinoIDERootDir() . That is defined at
~/Documents/MATLAB/SupportPackages/R2018b/toolbox/realtime/targets/arduinoide/+ide/+internal/getArduinoIDERootDir.p
Hello Walter this is where it is originally located. I'm not sure what to do next.
~/Documents⁩/⁨MATLAB⁩/SupportPackages⁩/⁨R2018b/⁩⁨toolbox/⁩target/⁨supportpackages/⁩arduinobase/⁩⁨+codertarget/⁩+arduinobase⁩/+internal/getArduinoIDERootDir.p⁩
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.
I installed both actually. I don't think that's what's causing the error message.
Looks like I copied the directory wrong when I posted before
~/Documents/MATLAB/SupportPackages/R2018b/toolbox/realtime/targets/arduinoide/+ide/+internal/getArduinoIDERootDir.p
I installed the package this afternoon in response to your question. I do not have the toolbox/targets directory that you mention.

댓글을 달려면 로그인하십시오.

 채택된 답변

Kestas Subacius
Kestas Subacius 2019년 3월 26일

0 개 추천

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:

추가 답변 (1개)

Madhu Govindarajan
Madhu Govindarajan 2019년 3월 25일

0 개 추천

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

카테고리

도움말 센터File Exchange에서 MATLAB Support Package for Arduino Hardware에 대해 자세히 알아보기

제품

릴리스

R2018b

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by