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
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 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.