Controlling Chrome’s “About: Dino” With Your Brain

Using brain-computer interfaces to control chrome’s “about dino”

Siyana Lalani
4 min readFeb 19, 2021

Especially during the pandemic, we’ve all experienced the frustration of wifi issues and no internet connection. If you’re someone who’s experienced this a lot, you’re probably familiar with the little dinosaur who pops up on the no internet screen!

What you might not know, is the game you can play with this little dinosaur. If you just click the space bar, a game starts. So if you’re ever bored with no internet you can always play this game!

Feeling Unproductive? Search up about: dino to play the game 😉

This game is pretty cool, especially when you’re bored out of your mind but why not take it a step further? Why not control this dinosaur with just my brain?

Brain-Computer Interfaces

I was actually able to do this with a technology called brain-computer interfaces 🧠. Essentially, this is a connection between our brains and a computer (just like the name implies). The BCI can sense and monitor brainwaves and therefore can send them to external devices you want to connect with or control with just the thought of it.

If you’re interested in understanding the technology better first (which I highly suggest), go check out one of my other articles for more of a 101 on BCI’s linked below 😄

So How’d I Do It?

Controlling a game with my brain? Seems pretty crazy but super cool. If you’re wondering how I did it, don’t worry I’ll explain!

Hardware

For this project, I used a Muse Model 2 headband. The Muse headband is an EEG headset and it uses electrodes to pick up brain activity. Essentially, I was able to optimize blink artifacts. The Muse EEG headband was able to pick up on my blinks because it sparks my brainwaves. Blinking makes a loud noise within your brainwaves! From there, I was able to use my blinks to control when the dinosaur jumped!

Web Bluetooth

To get the muse headband to connect to this game, I had to connect the headband to my computer. To do this, I used Web Bluetooth through google chrome which is one of the most secure ways for Bluetooth connection of websites with external devices.

The Code

1. The SDK

Although it was hard to find, for this project I needed to find an SDK. I used LibMuse which is provided by Muse and supports Headsets designed until 2016. LibMuse provides samples that show head position, blink status, jaw clenching status, and much more! This is very useful since it would take a lot of time to get training data to detect these accurately. Under artifacts, the SDK records both blinks and jaw clenches. These are both stored as booleans, or true/false variables. LibMuse is based on the Universal Windows Platform.

2. The UPD Sender

Since LibMuse is based on the Universal Windows Platform, there were some small things that needed to be bypassed. The Universal Windows Platform doesn’t support key sending for security reasons, but I was able to use Python to accomplish the same goal. TO do this I used a UDP or User Datagram Protocol which is a communicating protocol. By using this, I can communicate between the two different programs running at the same time.

3. The Actual Code

  • The sender sends a message to the Python process.
  • I then placed the sender in one of the callbacks of the SDK. The code says, “If you’re blinking now, but not before, then the sender sends a message”
  • When the reciever program receives the message, it sends the space key.

Just learning how to control a game with you brain isnt what BCI’s are limited to. Just this small step in learning and building, you can make an even bigger impact. From here, you can control toys like cars with your brain. You can control prosthetics to make them more life like. You can control even more and change the world, just by learning how to play a simple game!

--

--

Siyana Lalani

14 y/o laser focused on solving global problems l Currently building projects in the gene editing space