Warning: Unsuccessful read: Matching failure in format.

3 ビュー (過去 30 日間)
chfakht chfakht
chfakht chfakht 2015 年 2 月 6 日
コメント済み: Jan 2015 年 2 月 7 日
hi all , i'm getting this error whentrying to read serial data send from arduino in matlab
clear all
close all
clc
% create serial communication object on port COM14
arduin=serial('COM14','BaudRate',9600);
fopen(arduin); % initiate arduino communication
% You must call TIC without an output argument before
% calling TOC without an input argument.
tic;
% data va recevoir le type de mesure
while (toc<=20) % stop after 20 secs
data = fscanf(arduin,'%f');
end
fclose(arduin); % end communication with arduino
thanks
  1 件のコメント
Jan
Jan 2015 年 2 月 7 日
Please post the complete error message and mention, which line causes the problem.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB 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