Warning: Unsuccessful read: Matching failure in format.

조회 수: 1 (최근 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 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