Using a Brain-Computer Interface to Increase Focus
I am very bad a focu-
…
Where was I?
Right: I am very, extremely, bad at…
Crap, not again.
I am very bad at focusing. Many of us are. So to battle this, I decided to use a brain-computer interface — a device that measures our brain’s electrical activity — to capture my focus levels. Specifically, I used an EEG headband provided by Muse. How did I do it? Well, first, we’re going to have to take a step back to learn about how the technology works!
What the heck are EEGs?
EEG, short for electroencephalogram, is a method of recording our brain’s electrical activity. This method is preferable to most since it is less expensive than an MRI and it’s noninvasive. Tiny sensors, called electrodes, are placed on certain areas of your head. A signal is then recorded on a computer screen, hence being able to see the waves.
BUT WAIT!
There’s MORE!
These readings can be broken down even further.
Depending on their frequency, the readings can be classified as either gamma, beta, alpha, theta, or delta. You can read more about these here.
- Gamma waves are associated with memory.
- Beta waves correspond to active thinking.
- Alpha waves represent day to day movements and focusing.
- Theta and Delta waves both occur during sleep. Theta, however, can also be detected with meditation.
The important part here is that both alpha and beta waves have been linked to focusing! I ended up using the alpha waves
Hocus Focus!
Now for the exciting part: The part where I actually do a project! Previously, I did a project where I used a Muse headband to send spacebars whenever I blink. I edited this project to create this one, so you should check it out if you do not know about Libmuse (the SDK) or UDP senders/receivers.
First, edited UDP sender so that it would send the “alpha_absolute” variable pretty much constantly. Nothing else had to be done in the SDK. That was all.
The more exciting stuff was on the Python end. After asking for the user to focus for 30 seconds, the program would take the average of the “alpha_absolute” values that are sent over.
In the next stage, I take data that’s sent over and compare it to the average. I send a notification that ranges from “Stop drifting into lala land” to “Get back to work!” to “ARE YOU DEAD!??” depending on your level of focus.
If you’re 66% less than your average focus, then a message telling you to “Stop drifting into lala land” pops up. If you are at only 50% of your average power, then you’re told to get back to work. And if you’re 25% or less than your average focus… “ARE YOU DEAD!??”