Skip to content

Commit

Permalink
Support 8 and 32 channel Explore Plus devices (#700)
Browse files Browse the repository at this point in the history
* add explore plus code for 8 and 32 chan
  • Loading branch information
salman2135 authored Jan 20, 2024
1 parent f400b10 commit 491ef1f
Show file tree
Hide file tree
Showing 9 changed files with 101 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ public enum BoardIds
NTL_WIFI_BOARD = 50,
ANT_NEURO_EE_511_BOARD = 51,
FREEEEG128_BOARD = 52,
AAVAA_V3_BOARD = 53
AAVAA_V3_BOARD = 53,
EXPLORE_PLUS_8_CHAN_BOARD = 54,
EXPLORE_PLUS_32_CHAN_BOARD = 55,
};


Expand Down
4 changes: 3 additions & 1 deletion java_package/brainflow/src/main/java/brainflow/BoardIds.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ public enum BoardIds
NTL_WIFI_BOARD (50),
ANT_NEURO_EE_511_BOARD (51),
FREEEEG128_BOARD (52),
AAVAA_V3_BOARD(53);
AAVAA_V3_BOARD(53),
EXPLORE_PLUS_8_CHAN_BOARD(54),
EXPLORE_PLUS_32_CHAN_BOARD(55);

private final int board_id;
private static final Map<Integer, BoardIds> bi_map = new HashMap<Integer, BoardIds> ();
Expand Down
2 changes: 2 additions & 0 deletions julia_package/brainflow/src/board_shim.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ export BrainFlowInputParams
ANT_NEURO_EE_511_BOARD = 51
FREEEEG128_BOARD = 52
AAVAA_V3_BOARD = 53
EXPLORE_PLUS_8_CHAN_BOARD = 54
EXPLORE_PLUS_32_CHAN_BOARD = 55

end

Expand Down
2 changes: 2 additions & 0 deletions matlab_package/brainflow/BoardIds.m
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,7 @@
ANT_NEURO_EE_511_BOARD(51)
FREEEEG128_BOARD(52)
AAVAA_V3_BOARD(53)
EXPLORE_PLUS_8_CHAN_BOARD(54)
EXPLORE_PLUS_32_CHAN_BOARD(55)
end
end
2 changes: 2 additions & 0 deletions python_package/brainflow/board_shim.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ class BoardIds(enum.IntEnum):
ANT_NEURO_EE_511_BOARD = 51 #:
FREEEEG128_BOARD = 52 #:
AAVAA_V3_BOARD = 53 #:
EXPLORE_PLUS_8_CHAN_BOARD = 54 #:
EXPLORE_PLUS_32_CHAN_BOARD = 55 #:


class IpProtocolTypes(enum.IntEnum):
Expand Down
6 changes: 6 additions & 0 deletions src/board_controller/board_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,12 @@ int prepare_session (int board_id, const char *json_brainflow_input_params)
case BoardIds::AAVAA_V3_BOARD:
board = std::shared_ptr<Board> (new AAVAAv3 (params));
break;
case BoardIds::EXPLORE_PLUS_8_CHAN_BOARD:
board = std::shared_ptr<Board> (new Explore (board_id, params));
break;
case BoardIds::EXPLORE_PLUS_32_CHAN_BOARD:
board = std::shared_ptr<Board> (new Explore (board_id, params));
break;
default:
return (int)BrainFlowExitCodes::UNSUPPORTED_BOARD_ERROR;
}
Expand Down
74 changes: 74 additions & 0 deletions src/board_controller/brainflow_boards.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,80 @@ BrainFlowBoards::BrainFlowBoards()
{"battery_channel", 12},
{"other_channels", {13, 14}}
};
brainflow_boards_json["boards"]["54"]["default"] =
{
{"name", "ExplorePlus8Channels"},
{"sampling_rate", 250},
{"timestamp_channel", 10},
{"marker_channel", 11},
{"package_num_channel", 0},
{"num_rows", 12},
{"eeg_channels", {1, 2, 3, 4, 5, 6, 7, 8}},
{"emg_channels", {1, 2, 3, 4, 5, 6, 7, 8}},
{"ecg_channels", {1, 2, 3, 4, 5, 6, 7, 8}},
{"other_channels", {9}} // data status
};
brainflow_boards_json["boards"]["54"]["auxiliary"] =
{
{"name", "ExplorePlus8Channels"},
{"sampling_rate", 20},
{"timestamp_channel", 10},
{"marker_channel", 11},
{"package_num_channel", 0},
{"num_rows", 12},
{"accel_channels", {1, 2, 3}},
{"gyro_channels", {4, 5, 6}},
{"magnetometer_channels", {7, 8, 9}}
};
brainflow_boards_json["boards"]["54"]["ancillary"] =
{
{"name", "ExplorePlus8Channels"},
{"sampling_rate", 1},
{"timestamp_channel", 4},
{"marker_channel", 5},
{"package_num_channel", 0},
{"num_rows", 6},
{"temperature_channels", {1}},
{"battery_channel", 2},
{"other_channels", {3}}
};
brainflow_boards_json["boards"]["55"]["default"] =
{
{"name", "ExplorePlus32Channels"},
{"sampling_rate", 250},
{"timestamp_channel", 34},
{"marker_channel", 35},
{"package_num_channel", 0},
{"num_rows", 36},
{"eeg_channels", {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32}},
{"emg_channels", {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32}},
{"ecg_channels", {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32}},
{"other_channels", {33}} // data status
};
brainflow_boards_json["boards"]["55"]["auxiliary"] =
{
{"name", "ExplorePlus32Channels"},
{"sampling_rate", 20},
{"timestamp_channel", 10},
{"marker_channel", 11},
{"package_num_channel", 0},
{"num_rows", 12},
{"accel_channels", {1, 2, 3}},
{"gyro_channels", {4, 5, 6}},
{"magnetometer_channels", {7, 8, 9}}
};
brainflow_boards_json["boards"]["55"]["ancillary"] =
{
{"name", "ExplorePlus32Channels"},
{"sampling_rate", 1},
{"timestamp_channel", 4},
{"marker_channel", 5},
{"package_num_channel", 0},
{"num_rows", 6},
{"temperature_channels", {1}},
{"battery_channel", 2},
{"other_channels", {3}}
};
}

BrainFlowBoards boards_struct;
6 changes: 6 additions & 0 deletions src/board_controller/mentalab/explore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,12 @@ void Explore::read_thread ()
case 0x1e: // eeg99s
parse_eeg_data (&header, package_exg, payload_buffer, 4.5, 16);
break;
case 0x96: // eeg98 plus
parse_eeg_data (&header, package_exg, payload_buffer, 2.4, 16);
break;
case 0x94: // eeg32 plus
parse_eeg_data (&header, package_exg, payload_buffer, 2.4, 4);
break;
case 0x13: // env
parse_env_data (&header, package_anc, payload_buffer);
break;
Expand Down
4 changes: 3 additions & 1 deletion src/utils/inc/brainflow_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,11 @@ enum class BoardIds : int
ANT_NEURO_EE_511_BOARD = 51,
FREEEEG128_BOARD = 52,
AAVAA_V3_BOARD = 53,
EXPLORE_PLUS_8_CHAN_BOARD = 54,
EXPLORE_PLUS_32_CHAN_BOARD = 55,
// use it to iterate
FIRST = PLAYBACK_FILE_BOARD,
LAST = AAVAA_V3_BOARD
LAST = EXPLORE_PLUS_32_CHAN_BOARD
};

enum class IpProtocolTypes : int
Expand Down

0 comments on commit 491ef1f

Please sign in to comment.