Writeline function does not WORK in script problem

조회 수: 7 (최근 30일)
Mustafa Codur
Mustafa Codur 2020년 12월 31일
댓글: mariam Almutairi 2021년 1월 11일
Hello,
I am trying to connect my device (arduino uno) and MATLAB. Although readline works well, i have problem with writeline funtion. While it well work in command line (I added another writeline command right next to it to check the problem caused by speed and it still works welll in command line), the function does not work when i used it as a script line. Do you have any suggestion (not setup connection everytime) ?
EDIT; After connection is setted if i run the function in command window for one time, then it works fine in script also. But is there anyway to run it without using command window ??
EDIT2; the problem is solved by adding one second delay right after connection seting up.
  댓글 수: 2
Mustafa Codur
Mustafa Codur 2020년 12월 31일
the problem is solved by adding one second delay right after connection seting up.
mariam Almutairi
mariam Almutairi 2021년 1월 11일
thank you big big big time. the connection is now working

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Serial and USB Communication에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by