Knight Board Command Set
The Knight Board accepts ASCII string commands at runtime via BrainFlow’s
config_board() method. All commands below are passed as strings into:
board_shim.config_board(<command>)Timing — Add Pauses Between Commands
Section titled “Timing — Add Pauses Between Commands”The board needs time to process and apply each command before the next one is
sent. Always insert blocking pauses between consecutive config_board() calls.
Sending commands back-to-back without delays can cause settings to be dropped or
only partially applied.
Recommended minimum delays:
| Event | Pause |
|---|---|
After start_stream(), before first command | 2 s |
Between chon_ and rldadd_ for the same channel | 1 s |
| Between commands for different channels | 1 s |
board.start_stream()time.sleep(2) # wait for the board to stabilise after stream start
for ch in range(1, 9): time.sleep(1) board.config_board(f"chon_{ch}_12") time.sleep(2) board.config_board(f"rldadd_{ch}") time.sleep(1)Command 1 — Enable EEG Channel / Set Gain
Section titled “Command 1 — Enable EEG Channel / Set Gain”Purpose: Enables a specified channel and sets its gain, starting data acquisition on that channel. If the channel is already enabled, its gain is updated.
chon_{channel}_{gain}Parameters:
| Parameter | Description |
|---|---|
channel | One-indexed channel number to enable (1 – 8). |
gain | Amplification level. Allowed values: 1, 2, 3, 4, 6, 8, 12 (recommended). |
Example — enable channel 3 at gain 12:
board_shim.config_board("chon_3_12")Command 2 — Disable EEG Channel
Section titled “Command 2 — Disable EEG Channel”Purpose: Disables a specified channel, stopping data acquisition on that channel.
choff_{channel}Parameters:
| Parameter | Description |
|---|---|
channel | One-indexed channel number to disable (1 – 8). |
Example — disable channel 5:
board_shim.config_board("choff_5")Command 3 — Toggle RLD On
Section titled “Command 3 — Toggle RLD On”Purpose: Enables the Right-Leg Drive (RLD) for the specified channel.
rldadd_{channel}Parameters:
| Parameter | Description |
|---|---|
channel | One-indexed channel number to include in the RLD network. |
Example:
board_shim.config_board("rldadd_1")Command 4 — Toggle RLD Off
Section titled “Command 4 — Toggle RLD Off”Purpose: Disables the Right-Leg Drive for the specified channel.
rldremove_{channel}Parameters:
| Parameter | Description |
|---|---|
channel | One-indexed channel number to remove from the RLD network. |
Example:
board_shim.config_board("rldremove_1")Typical Startup Sequence
Section titled “Typical Startup Sequence”A standard session enables all desired channels and adds them to the RLD network
after calling start_stream():
import timefrom brainflow.board_shim import BoardShim, BrainFlowInputParams, BoardIds
params = BrainFlowInputParams()params.serial_port = "COM3" # adjust for your OSparams.other_info = '{"gain": 12}' # optional global gain override
board = BoardShim(BoardIds.NEUROPAWN_KNIGHT_BOARD, params)board.prepare_session()board.start_stream()
num_channels = 8for ch in range(1, num_channels + 1): time.sleep(1) board.config_board(f"chon_{ch}_12") # enable channel at gain 12 time.sleep(2) board.config_board(f"rldadd_{ch}") # add to RLD time.sleep(1)