()
| 4 | |
| 5 | |
| 6 | def main(): |
| 7 | BoardShim.enable_dev_board_logger() |
| 8 | |
| 9 | params = BrainFlowInputParams() |
| 10 | board = BoardShim(BoardIds.BRAINBIT_BOARD.value, params) |
| 11 | board.prepare_session() |
| 12 | |
| 13 | board.start_stream(45000, 'file://raw_data.csv:w') |
| 14 | # its a little tricky and unclear, need to call start_stream to create data acquisition thread(it also sends CommandStartSignal) |
| 15 | # after that send CommandStartResist, CommandStopResist and to get EEG data call CommandStartSignal manually |
| 16 | board.config_board('CommandStartResist') |
| 17 | time.sleep(5) |
| 18 | board.config_board('CommandStopResist') |
| 19 | board.config_board('CommandStartSignal') |
| 20 | time.sleep(5) |
| 21 | data = board.get_board_data() |
| 22 | board.stop_stream() |
| 23 | board.release_session() |
| 24 | |
| 25 | print(data) |
| 26 | |
| 27 | |
| 28 | if __name__ == "__main__": |
no test coverage detected