Several months ago, I decided to take a class that would change my perception on technology and the human brain. If you did not already see my research proposal, then click here to read it first. After months of hard work and dedication, I finally finished my project. The ability to display brainwave data on a smartphone.
My Initial Plan.
I first created a plan with my mentor Matt Yun. In the AAR program, every student is paired up with their own mentor in that specific field. Lucky for me, my mentor already had previous experience with brainwaves and EEG headsets.
My plan was to find a way to extract the data from the Emotiv headset. After doing so, I would devise a way to send the brainwave data to a server and receive that data on a smartphone. But for any high schooler, this was not an easy task to do with the amount of work given to students in school.
I had an idea to go with my friend to a Treehacks, Stanford University’s official 36-hour hackathon. A hackathon, or an event in which a large number of people meet to make all sorts of creative projects out of code, would be the perfect place to work on this project. Unfortunately due to age restriction, we were not even allowed to attend.
After being kicked out of the hackathon, we got some Jamba Juice, ordered a pizza and started hacking in a Starbucks on the Stanford campus. What only felt like a few minutes, was a few hours. It was 10pm. Starbucks was closing and I still was finding a way to hack the Emotiv headset. I needed to come up with another plan.
After asking my mentor for some advice, I tried playing with the Emotiv headset a few weeks later. My main challenge was to find a way to decrypt the data being sent from the Emotiv. After a few days of playing with Python and bash scripts I finally was successful enough to see the raw stream of data being sent to the computer. I had just conquered my biggest challenge of all.
Completing half of the project gave me the inspiration I needed to finish this project. I texted my friend to meet me at the library and we moved on to the next phase of the project. All I needed to do was find a simple way to send the data from the computer to an iOS device. I used ngrok, or a service that creates secure tunnels to localhost. Then an iOS app was created so that the user could open it and receive the information sent from the computer. After receiving the data on the iOS device, I parsed it into JSON using Alamofire. Lastly, I formatted the data into the app.
The Final Steps.
After finishing the app, I did some more research to give the raw data some purpose. The few months of hard work was worth it. I had done it. I finished it. If you want to read my complete project, click here.