Using Brainwave Data to Control an LED using AS3, AIR, Mindset BCI and Arduino

Here’s a new AS3/Flex project I’ve been working on that uses brainwave data to control an LED on an Arduino microcontroller. The brainwave data is captured with a Mindset BCI, sent into an AIR application and then sent to an Arduino Duemilanove. It uses the AS3 API I created for interfacing Flash/Flex projects to the Mindset and also AS3Glue to communicate with the Arduino from AIR.

This is a pretty simple project, only involving an LED. The possibilities from here are pretty promising though. I created this as a proof of concept to ensure I could get all of the various hardware communicating through the AIR application. The AIR app in this case is the catalyst to bring all of the various hardware together and enable communication between it. The same thing could probably be accomplished with the C language but since I know AS3 and Flex a lot better I decided to use it.

There are two ‘server’ type applications involved as well, SerProxy and the Thinkgear Connector. These are freely available and pretty easy to work with.

One tricky part of getting everything working is the COM ports used by the Arduino and the Mindset. I had some conflicts but they weren’t too difficult to get sorted out. I just had to assign the Arduino and Mindset to use separate COM ports. I’m using Windows so the Arduino gets automatically assigned a COM port. The Mindset wanted to use the same one :(

You can check out this video to see everything in action. I also talk more about the project. As mentioned this is really a test to ensure that I could get all the hardware communicating. Now that the brainwave data is being captured, processed and sent to the Arduino I can use it to control anything connected to the microcontroller. This could be a servo, motor, anything really. Neurosky, the manufacturer of the Mindset has a game they’ve created with Mattel that uses brainwave data to control a ball on a track. I was thinking about trying to do something somewhat similar and create a game as well.

Getting all of this working together is something I’ve been working towards for a while so I’m pretty excited! Here’s the link to the video demonstrating the Mindset BCI, Arduino and Flex to control an LED.

2 Responses to “Using Brainwave Data to Control an LED using AS3, AIR, Mindset BCI and Arduino”

  1. That is really cool! How much more simple would it be to just do a cool visualization of the BCI data in Flex? I’d be interested in doing something like that.

    Thanks for sharing.

  2. Nice. I’ve been doing something similar for my final project at uni. I use a star wars force trainer for the headset and an arduino to communicate to flash. I made a game where you control a space giraffes mind powers and blow stuff up with thought. I also use a kinect so you can point at stuff you want to blow up and then think about it.

    http://www.jonsfmp.wordpress.com has more stuff about my project if you want a look, but isn’t doing stuff with mind power really cool? It’s like being in the future.

Leave a Reply