How I Played The Chrome Dino Game With My Brain Signals

Using Brain-Computer Interfaces to play video games…

Ahnaaf Khan
3 min readJan 20, 2021

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.

The Background

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:

  1. Electroencephalography (also EEG…): Brain data
  2. Electromyography (EMG): Muscle data
  3. Electrocardiography (ECG) : Heart data
OpenBCI Ganglion Board

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 Setup


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.

The Process

This took way too long

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.

The Result

Skip to 1:57 for demo

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!

Hey! If you made it all the way down here I just want to say thank you for reading! If you enjoyed the article, clap it up and contact me on Twitter, Linkedin, or Check out my website too while you’re at it.



Ahnaaf Khan

Learning about climate tech through writing and teaching. Previously I wrote about my work in neurotech. Currently studying mechatronics @ QueensU.