Hey guys,
I use the following code in matlab:
s = serial('COM3');
disp(['s input buffer size ', num2str(s.InputBufferSize)]);
set(s,'Terminator','LF'); % define the terminator for println
set(s,'Databits',8);
set(s,'Stopbits',1);
set(s,'Parity','none');
set(s, 'BaudRate', 9600);
fopen(s);
and it seems that after the fopen the arduino resets. Because the init is called again. Why does it happen?