Warning: Unsuccessful read: Matching failure in format.
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (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!