Airgame single-channel EEG equipment receives data in Matlab through lsl

First, you need to use python to receive and forward the data, and then use Matlab to receive, principle: based on lsl.
1. You can contact the administrator (wechat:l20081123456) for the code for python to receive and forward the data, and give the code after purchasing the equipment.

2. Matlab receiving data code:

addpath(genpath('/home/ibagon/OpenBCI/OpenBCI_MATLAB/Matlab-Python/labstreaminglayer'))
%% 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});
[vec,ts] = inlet.pull_sample();
start = ts;
eeg_record = [];
while ts - start < 5
    [vec,ts] = inlet.pull_sample();
    eeg_record = [eeg_record;vec];
    fprintf('%.2f\t',vec);
    fprintf('%.5f\n',ts);
end

#This article was originally/reprinted by the BCIduino brain-computer interface open source community (public account "BCIduino brain-computer interface community"). The BCIduino brain-computer interface community was initiated by masters and doctors from Beijing University of Aeronautics and Astronautics, Cornell University, Peking University, Capital Medical University, etc. Welcome to scan the code below to join the community, and also welcome to purchase BCIduino EEG modules and exoskeleton, etc. You can search for it or scan the code for detailed inquiry).
Insert picture description here

Insert picture description here

Guess you like

Origin blog.csdn.net/nvsirgn/article/details/109185668