MATLAB Answers

0

Warning: Unsuccessful read: Matching failure in format.

Asked by chfakht chfakht on 6 Feb 2015
Latest activity Commented on by Jan
on 7 Feb 2015
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 Comment

Please post the complete error message and mention, which line causes the problem.

Sign in to comment.

0 Answers