Summary

  • Add support for Mentalab devices - #542
  • Fixed minor issue with read_file method, last row was zero - #545
  • Add get_heart_rate method - #543
  • Add support for non-default presets to playback and streaming boards - #541

Mentalab Devices

In this release we’ve added support for Explore four and eight channels devices from Mentalab.

It has three presets:

  • BrainFlowPresets.DEFAULT_PRESET which contains EXG data
  • BrainFlowPresets.AUXILIARY_PRESET which contains accelerometer and gyroscope data
  • BrainFlowPresets.ANCILLARY_PRESET which contains battery and temperature data

Example script:

import argparse
import time

from brainflow.board_shim import BoardShim, BrainFlowInputParams, BrainFlowPresets, BoardIds
from brainflow.data_filter import DataFilter


def main():
    BoardShim.enable_board_logger()

    params = BrainFlowInputParams() 
    board = BoardShim(BoardIds.EXPLORE_4_CHAN_BOARD, params)
    board.prepare_session()
    board.start_stream()
    time.sleep(10)    
    data_eeg = board.get_board_data(preset=BrainFlowPresets.DEFAULT_PRESET)
    data_orn = board.get_board_data(preset=BrainFlowPresets.AUXILIARY_PRESET)
    data_env = board.get_board_data(preset=BrainFlowPresets.ANCILLARY_PRESET)
    board.stop_stream()
    board.release_session()
    
    print(data_eeg)
    print(data_orn)
    print(data_env)
    DataFilter.write_file(data_eeg, 'data_eeg.csv', 'w')
    DataFilter.write_file(data_orn, 'data_orn.csv', 'w')
    DataFilter.write_file(data_env, 'data_env.csv', 'w')


if __name__ == "__main__":
    main()