Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
76 lines (57 sloc) 2.94 KB
# Author: Eric Blue
# url =
# email = ericblue76 (at) gmail (dot) com
# Project: Neurosky Brainwave Visualizer
After purchasing a Neurosky Mindwave EEG device, I was surprised to see limited apps for
viewing and visualizing EEG output (brainwave activity for delta, theta, alpha, and beta waves).
Upon discovering 'How to Hack Toy EEGs' (, I was inspired
by the Processing visualization of the Arduino-based serial output. I wanted to visualize the
same set of data, however decided to obtain it using Neurosky's published ThinkGear Socket Protocol
This fork of kitschpatrol's original code differs in that it doesn't use the Serial interface
to obtain brainwave data. Rather, it communicates via the ThinkGear connector using the
ThinkGear Socket Protocol and requests data in JSON format.
[MindWave/MindSet Communication]
By default the ThinkGear Connector allows applications to connect over TCP (default
and request data in either binary or JSON format. This application will connect to the ThinkGear socket,
and read the streaming real-time data. Format:
The default IP and port will be used, unless alternatives are specified as environment variables (THINKGEAR_HOST
and THINKGEAR_PORT). Port forwarding can be used on the host Windows or Mac computer to allow remote servers to connect.
To allow other hosts to connect and run Processing, run ReplayTCP (
OR, use netcat (windows or mac) to port forward (clients can now connect to port 13855).
Ex: nc -l -p 13855 -c ' nc localhost 13854'
[Required Libraries]
The following required libraries are included:
- ControlP5 (See
- JSON (See
Make sure to unzip and include under your normal 'sketchbook' libraries folder. Example directory structure:
|-- controlP5
| `-- library
| `-- controlP5.jar
|-- json
| `-- library
| `-- json.jar
Binaries were created using Processing's app builder (platforms = windows, mac & linux)
- Re-visit previous todo from original code
- Add ability to record data (CSV, etc.)
This code was inspired by the 'How to Hack Toy EEGs' article and forked from
kitschpatrol (
- Original Processing code from
Eric Mika, Arturo Vidich and Sofy Yuditskaya (
- Integration with Neurosky Thinkgear Socket Protocol from
Eric Blue (