Error : Undefined variable "matlab" or class "matlab.hw​mgr.intern​al.hwconne​ction.USBD​eviceEnume​rator" - Standalone application / ArduinoIO

Hi,
I'm trying to compile a very simple standalone app with Matlab2017a that connect to an Arduino using the Matlab ArduinoIO support package. The code is the following:
a = arduino
In Matlab it works perfectly and connect to my Arduino UNO. When compiled I've got the following error message:
Undefined variable "matlab" or class "matlab.hwmgr.internal.hwconnection".
Is the Matlab compiler working with ArduinoIO? Did I missed a file inclusion?
Thank you,
Julien

 채택된 답변

For the record, this was answered by Matlab Support Team here since.

추가 답변 (1개)

What's not working in the compiler is:
  • the COM port search function
  • the automatic Arduino board type detection
So in order to compile a functional software so have to specifiy the com port and the board type.
For example:
arduinoConnection = arduino('COM1', 'Uno');

카테고리

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

질문:

2018년 2월 15일

댓글:

2019년 10월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by