Im trying to send some data from my teensy to matlab but matlab didnt even call the callback function:
This is my matlab Funcion:
delete(instrfind);
s = serial('COM15','BaudRate',9600,'ReadAsyncMode','continuous');
s.BytesAvailableFcn = {@graf};
fopen(s);
This is the callback function I comment it so I can see only the display on console
function graf(obj,event)
disp('a');
%{
texto=fscanf(obj);
texto2=strsplit(texto,',');
x=cellfun(@str2num,texto2);
plot(x);
%}
end
My teensy baudrate is 9600 and im printing like this
Serial.println(se);
so it has the terminator all right..
I can see the serial on the arduino serial monitor and in the Realterm
Edited
I just find that my teensy work ad 12Mbit/s
Link is there a way to configure matlab serial port at that speed?
Best Answer
Just a note to say I use gnu-octave so I went to Mathworks and the help page said the following: