No OpenBCI_EEG stream, only OpenBCI_AUX
Opened this issue · 0 comments
basophobic commented
I have set up my OpenBCI to stream data from 8 electrodes to matlab through LSL. The stream is started correctly and data from the 8 channels are seen on screen after running
python openbci_matlab.py -p "/dev/ttyUSB0"
. However when I try to acquire in MATLAB the channel DATA using:
% instantiate the library
disp('Loading the library...');
lib = lsl_loadlib();
% resolve a stream...
disp('Resolving an EEG stream...');
result = {};
while isempty(result)
result = lsl_resolve_byprop(lib,'type','EEG'); end
% create a new inlet
disp('Opening an inlet...');
inlet = lsl_inlet(result{1});
disp('Now receiving data...');
while true
% get data from the inlet
[vec,ts] = inlet.pull_sample();
% and display it
fprintf('%.2f\t',vec);
fprintf('%.5f\n',ts);
end
% resolve a stream...
disp('Resolving an EEG stream...');
result = {};
while isempty(result)
result = lsl_resolve_byprop(lib,'type','EEG'); end
% create a new inlet
disp('Opening an inlet...');
inlet = lsl_inlet(result{1});
disp('Now receiving data...');
while true
% get data from the inlet
[vec,ts] = inlet.pull_sample();
% and display it
fprintf('%.2f\t',vec);
fprintf('%.5f\n',ts);
end `
MATLAB freezes in the while loop as result
is constantly empty. Additionally, when running the vis_stream
MATLAB script, in the first drop down in settings, all I'm presented is the OpenBCI_AUX (with 3 channels) and nothing about the OpenBCI_EEG stream.
Has anyone experienced the same problem?