control a bracket bot using mental commands detected by the Emotiv EPOC X headset. streamed through emotiv's cortex API, and delivered via MQTT over wi-fi :)
- bracket bot
- emotiv developer account with API access (Pro or Pro Trial)
- emotiv EPOC X headset
- mosquitto broker installed and running on pi
- emotiv launcher + emotiv BCI installed and running on mac
- cortexService running on mac (check port 6868)
note: go through quickstart for bracket bot prior to following these instructions. this repo is meant to be used on top of the nodes provided in the existing bracket bot documentation.
- install mosquitto MQTT broker:
sudo apt update
sudo apt install mosquitto mosquitto-clients
sudo systemctl enable mosquitto
sudo systemctl start mosquitto- run the motor control script (
node_drive.py) on raspberry pi (found in bracket bot quickstart):
python3 node_drive.py^ this listens for MQTT commands like "forward", "stop", etc.
- clone repository locally
- install dependencies:
pip install -r requirements.txt- connect EPOC X headset via bluetooth in emotiv launcher
- create a trained profile with mental commands like "push" and "neutral"
- grant cortex API access (should pop up when script requests access)
- launch
node_eeg.pyon your mac
python3 node_eeg.pythis connects to emotiv, streams mental commands, and publishes over MQTT
- press "push" mentally → robot drives forward
- relax to "neutral" → robot stops
| Symptom | Fix |
|---|---|
| no headset detected in script | restart emotiv launcher and cortexService |
| no authorization popup | restart launcher, check API access |
| "auth missing" error | you must have emotiv Pro or Trial API access |
| "connection refused" on MQTT | fix mosquitto config to listen globally |
| commands not moving robot | check odrive connection and set_velocity() logs |
- add smoother mental command filtering (ignore low-power false positives) <- done via Emotiv, not repo-applicable
- add backward and turn mental commands