Send values in a variable from Matlab to arduino using serial communications
2 ビュー (過去 30 日間)
古いコメントを表示
Dear all, may I know how to send a values (numbers) in a variables from MATLAB to ARDUINO.
Below is my coding but error arise.
%Compute Standard Deviation of x and send it to serial
sdA = std(x)
s = serial('COM6');
s.Baudrate = 9600;
s.Terminator = 'CR';
%open serial port
fopen(s);
%send value '100' else send 101
fprintf(s,'sdA');
fscanf(s);
fclose(s);
0 件のコメント
回答 (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!