fread doesn't work
Show older comments
Hi, I tried to use fread with the little script in the 'help fread' in matlab, using my active COM but I get an error!
s = serial('COM3');
fopen(s);
fprintf(s, 'Curve?');
data = fread(s, 512);
The error is:
Warning: Unsuccessful read: The specified amount of data was not returned within the Timeout period.
Answers (1)
David Sanchez
on 13 Nov 2013
0 votes
You are trying to read data that are not available yet. Try with fscanf.
Categories
Find more on Arduino Hardware in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!