Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No OpenBCI_EEG stream, only OpenBCI_AUX #1

Open
basophobic opened this issue Feb 11, 2018 · 0 comments
Open

No OpenBCI_EEG stream, only OpenBCI_AUX #1

basophobic opened this issue Feb 11, 2018 · 0 comments

Comments

@basophobic
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant