Python Data Stream On Mac

edited June 30 in Cyton

I am using MacOS 14.5. I tried OpenBci GUI to stream the data from my cython-daisy 16-channel board, and randomly, it opened the streaming, but after 5 seconds, it said there was no change in data and then stopped. Also, most of the time, the streaming will not start, and it says, please select 8 channels. However, I have 16 channels. Also, I used brain flow in Python to stream and collect the data, but that one also is not working, and once I run the code, it will not stop.
I would greatly appreciate your help.

here is my code:

BoardShim.enable_dev_board_logger()
# use synthetic board for demo
params = BrainFlowInputParams()
params.serial_port ="/dev/tty.usbserial-D200QEPF"
board = BoardShim(2, params)
board.prepare_session()
board.start_stream()
time.sleep(36)
data = board.get_board_data()
board.stop_stream()
board.release_session()
eeg_channels = BoardShim.get_eeg_channels(2)
eeg_data = data[eeg_channels, :]
eeg_data = eeg_data / 1000000  # BrainFlow returns uV, convert to V for MNE
# Creating MNE objects from brainflow data arrays
ch_types = ['eeg'] * len(eeg_channels)
ch_names = BoardShim.get_eeg_names(BoardIds.SYNTHETIC_BOARD.value)
sfreq = BoardShim.get_sampling_rate(2)
info = mne.create_info(ch_names=ch_names, sfreq=sfreq, ch_types=ch_types)
raw = mne.io.RawArray(eeg_data, info)
raw.crop(tmin=3,tmax=33)

Comments

Sign In or Register to comment.