How can I take values directly from MATLAB over serial communication?

조회 수: 2 (최근 30일)
I'm implementing the code in this link, but I have a problem at this line:
servalue= input('');
I want to get values directly when servalue is assigned not to wait for the user to write the value. When I assign it directly, the LED will not be still and it gives a quick flash and then turns off. I tried to make a delay but the same thing happens. So could anyone help me figure out how I can do that? Thanks.

채택된 답변

Ezz El-din Abdullah
Ezz El-din Abdullah 2018년 7월 1일
I found the answer here if anyone interested.
I should have added
pause(2)
after fopen function.

추가 답변 (0개)

카테고리

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