I am sending data to Arduino serially, and I want it to read them and return them back to me.
The MATLAB code is
set(s, 'TimeOut', 10);
for i = 1:50
fwrite(s, i, 'uint8');
rx(i) = fread(s, 1);
The error message I get is: " Warning: Unsuccessful read: The specified amount of data was not returned within the Timeout period.. "
I have read some possible causes for that problem such as the TimeOut period which I turned to 10. However I still get the same message. Can anyone help please?