Experiments, the way to inventions

From the Blog

Jun
26
Posted by Valtokari Ville at 3:20 am

When making the HyperCat this little idea popped up in my mind. If adding Mindwave to Processing was easy and python was almost trivial. So why not add it in Blender Game Engine. In Blender game engine it is easy to prototype small games as you can model and create game in same software.
This game was made in 4 hours of watching blendercookie tutorials and 6 hours of playing around in blender 2.58. I used also Attention from mindwave as that seems to be easier to control. (Maybe I should train little bit meditation). Here attention controls the flying force of butterfly.

When attention reaches 50 and over butterfly will flap its wings and gain some upward force. I created small park (still in progress) to explore. With few hours more I should have some kind of visualizer for different brainwaves that mindwave produces and included in the world.

Here is a video of game in action:

I will be adding the sources for downloads as soon as I get more done in the scenery and  few effects that I want to create in there.

Jun
25

As first test using Processing I created small program that reads attention value from Neurosky Thinkgear connector and set small facial expression of anime character.

From Thingear connector to Processing

Thinkgear connector is a program that connects to Mindwave RF dongle and provides interface to use mindwave with ease.

To use it with json format you have to send configure json to connector. I used

{“format”:”Json”,”enableRawOutput”:false}

to select output format to JSON and disable raw EEG output as I didn’t need it.

With reading I didn’t use any JSON library as I have found out that few JSON string from connector were not valid and few attention values slipped trough and diminished the response time to changes in attention.

To get attention value and signal status I used simple parsing to find if incoming data contained attention or  poorSignalLevel keywords and found out what integer there.

Processing side

Processing was nice suprise how easy it was to create something in short amount of time. Whole project took only 5 hours to complete with drawing (Thanks to Petri Haikonen for the graphics) , coding and testing.

Mindwave reader runs in separated thread to allow program update GUI without delays from socket reads.

Small video of program in action.

Sources: HyperCat