Arduino erros using Matlab. (Use Matlab like Monitor Serial)
2 ビュー (過去 30 日間)
古いコメントを表示
Hi, I trying to control one Arduino system and read their output data, just like the monitor serial from the Arduino IDE. I read a little about it, but I only find how to set some outputs signals and/or read some digital outputs. I trying something but it always comes to this message and I can only read the first message that would come in the serial monitor. 'Warning: Unsuccessful read: A timeout occurred before the Terminator was reached..'
s = serial('COM11')
set(s,'BaudRate', 115200)
fopen(s)
out = fscanf(s)
z=1;
while (z==1)
dat = fscanf(s);
fwrite(s,1);
fscanf(s);
end
It's one way that the Matlab works like the serial monitor, I mean, that I can read e write information instantly? I like to use Matlab because sometimes I would like to use some loops and it would be impossible to do automatic in serial monitor from Arduino IDE.
Thanks, everybody.
4 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File 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!