필터 지우기
필터 지우기

The problem of delay in contact with Ardiono

조회 수: 1 (최근 30일)
wisam kh
wisam kh 2019년 3월 15일
댓글: Madhu Govindarajan 2019년 3월 25일
I connect the MATLAB with the ArduinoArduino. The problem is when I want to send a command from the Matlab to the Arduino; it requires opening contact with the Arduino. The process of opening contact with Arduino requires about three seconds. Why does the open connection process require this long time?
is there a solution?
The below code opens the connection from the Matlab to the Arduino.
a = arduino('com8', 'Uno');

답변 (1개)

Madhu Govindarajan
Madhu Govindarajan 2019년 3월 18일
When you attempt to open a connection with Arduino, MATLAB downloads an Arduino sketch to the hardware and this is the reason it takes sometime. To reduce this as much as possible, first perform arduinosetup which is a MATLAB Command that sets all the libraries up for you from within a user interface. Then the next time you can just do a = arduino on MATLAB Command Window or scripts and this should take least amount of time in opening connection with Arduino.
There is no way that I know to make this time zero, if that is what you mean by is there a solution.
  댓글 수: 2
wisam kh
wisam kh 2019년 3월 24일
Thank you sir. In fact, I already use this library to link the Matlab with the Arduino, but the time required to execute orders from the Matlab on the Arduino is still long and requires several seconds.
Madhu Govindarajan
Madhu Govindarajan 2019년 3월 25일
Do you mean a = arduino is long or the other commands? It might be relevant to look into the Simulink support package for Arduino as that can make your Arduino work independent of your PC.
Regards,
Madhu

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

카테고리

Help CenterFile Exchange에서 MATLAB Support Package for Arduino Hardware에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by