How I Played The Chrome Dino Game With My Brain Signals
Using Brain-Computer Interfaces to play video games…
This past week I’ve been hard at work on one of the most fun projects I’ve ever had. I used a Brain-Computer Interface to play the Chrome Dino game with my Electromyography (EMG) signals.
Brain-Computer Interfaces (BCI) are devices that enable us to communicate with computers using our brains. A specific type of BCI known as an electroencephalogram (EEG) is a non-invasive approach to BCI which uses metal disks (electrodes) to detect the electrical gradients from your brain between at least 2 different electrodes.
Different EEGs have different capabilities, and can collect different types of biosensing data:
- Electroencephalography (also EEG…): Brain data
- Electromyography (EMG): Muscle data
- Electrocardiography (ECG) : Heart data
The BCI that I used for my project was the OpenBCI Ganglion Board. It’s capable of detecting all 3 types of biosensing data and was perfect for my needs. I needed something that could detect when I flex my muscles so that I can get that dino to jump from my brain signals.
The Ganglion was perfect for me since it could detect EEG, EMG, and ECG data which would be perfect for future projects. For this project, all I needed was the EMG data from my forearm.
The Ganglion is somewhat similar to an Arduino. There’s a small blue board where you connect various cables and electrodes to it to get your preferred data.
In order to get EMG data from my forearm, I had to attach sticky electrodes to my arm (which hurt like hell when you take them off) to detect when my muscles are flexing.
Even though I got my EMG data visualized, it means nothing if I can’t turn that into some meaningful output. After doing some digging on the OpenBCI docs, I saw that OpenBCI uses the Brainflow library to program their hardware.
Admittedly, it took way too long to build that. But overall, it was a great learning experience where my perseverance was tested as I watched the sun go down as I coded. After I got the program to work, and the dinosaur jumped everytime I flexed, I was fucking hyped; But too tired to celebrate properly.
I recorded the entire process from start to finish for your enjoyment! As someone who has been learning about BCIs for a long time, it felt super cool to finally get my hands dirty with a fun yet simple project. Expect more from me soon!