This project implements a brain-computer interface (BCI) that processes EEG signals in real time to predict user commands and control Minecraft gameplay via keyboard input. It includes data loading, preprocessing, CNN model training, and live EEG streaming with command execution. N.B. This is for an OpenBCI Setup (Tested on Mac M1 but not on windows or linux) & Output commands are easily alterable for any purpose
This project utilises EEG data sampled at 250 Hz to train a convolutional neural network (CNN) model to classify brain states into actionable commands such as movement and actions in Minecraft. Real-time EEG data is streamed from an OpenBCI Cyton board using BrainFlow, filtered, features extracted, classified, and mapped to Minecraft controls via keyboard automation.
- Loading and windowing large EEG datasets from CSV files
- Data preprocessing including normalisation and label encoding
- CNN model architecture for EEG classification
- Real-time EEG data streaming via BrainFlow
- Bandpower feature extraction for classification
- Keyboard control mapping to Minecraft actions
- Modular, easily extendable design
git clone https://github.com/your-username/your-repo.git
cd your-repo
### 2. Install Pyhton dependencies:
python -m venv venv # Create virtual environment (optional but recommended)
source venv/bin/activate # Activate virtual environment on Linux/Mac
# or
venv\Scripts\activate # Activate virtual environment on Windows
pip install --upgrade pip
pip install -r requirements.txt
### 3. Set up hardware and drivers:
- Connect Cyton EEG board
- Ensure you have BrainFlow installed and working
- Adjust the serial port in your configuration if necessary