Skip to content

Using the LSL App

NeuroPawn-LSL is a small, dependency-light Python application with two parts:

FilePurpose
knight_lsl_gui.pyConnects to the board over serial, sends channel/RLD/gain commands, parses packets, and publishes an LSL stream.
knight_lsl_receiver.pyResolves the stream and shows a live scrolling plot of every channel.

No coding is required to use either script — both are self-contained GUIs.

Clone the repo and install its dependencies (pyserial, numpy, scipy, pylsl, and matplotlib):

Terminal window
git clone https://github.com/NeuroPawn/NeuroPawn-LSL.git
cd NeuroPawn-LSL
pip install -r requirements.txt
Terminal window
python knight_lsl_gui.py

In the streamer window:

  1. Connection — pick the board’s serial port and a gain (default 12), then click Connect.
  2. Channels / RLD — check the channels you want active and, optionally, add them to the RLD network.
  3. Filters — optional software notch (50/60 Hz) and 1–40 Hz bandpass, applied before the data reaches LSL.
  4. Start Stream — queues the chon_/rldadd_ commands for your selections, then listens to the live packets to auto-detect whether it’s talking to a standard board (8 channels) or an IMU board (8 EEG + 9 motion channels).

Once detection succeeds, the app opens an LSL outlet named NeuroPawnKnight at 125 Hz. Channel labels (EXG1EXG8, plus AccelX/Y/Z, GyroX/Y/Z, MagX/Y/Z on IMU boards) are attached as stream metadata, so downstream tools don’t need to guess the layout.

In a second terminal:

Terminal window
python knight_lsl_receiver.py

The receiver auto-discovers the NeuroPawnKnight stream (or lets you pick any other LSL stream on the network), connects, and plots every channel in a scrolling window. EEG channels are shown on a fixed µV scale that you can adjust; IMU channels autoscale to their own range.