Using the LSL App
NeuroPawn-LSL is a small, dependency-light Python application with two parts:
| File | Purpose |
|---|---|
knight_lsl_gui.py | Connects to the board over serial, sends channel/RLD/gain commands, parses packets, and publishes an LSL stream. |
knight_lsl_receiver.py | Resolves the stream and shows a live scrolling plot of every channel. |
No coding is required to use either script — both are self-contained GUIs.
Install
Section titled “Install”Clone the repo and install its dependencies (pyserial, numpy, scipy,
pylsl, and matplotlib):
git clone https://github.com/NeuroPawn/NeuroPawn-LSL.gitcd NeuroPawn-LSLpip install -r requirements.txtRun the Streamer
Section titled “Run the Streamer”python knight_lsl_gui.pyIn the streamer window:
- Connection — pick the board’s serial port and a gain (default
12), then click Connect. - Channels / RLD — check the channels you want active and, optionally, add them to the RLD network.
- Filters — optional software notch (50/60 Hz) and 1–40 Hz bandpass, applied before the data reaches LSL.
- 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 (EXG1–EXG8, 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.
Run the Receiver
Section titled “Run the Receiver”In a second terminal:
python knight_lsl_receiver.pyThe 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.
