We are unable to receive the output (a single value +1/-1) on the Arduino COM port on which we created the connection.
Here is the code we are using:
Code: Select all
function [matrix_out,stim_out]=bci_Process(bci_context,matrix_in,stim_in)
result = svmfxn(matrix_in, model2); % Our classifier output
s1=serial('COM11', 'BaudRate', 9600); % Opening the Arduino connection on COM11
fopen(s1);
fwrite(s1, result)
fclose(s1)
end
We are able to see the LED blink for opening the connection. But the write statement does not seem to work, which we verified from the Serial Monitor.
The OpenViBE scenario being used is attached.