Coder Social home page Coder Social logo

studio522 / fork_processing-brain-grapher Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ericblue/processing-brain-grapher

0.0 0.0 0.0 1.29 MB

Basic visualizer for Neurosky devices (Mindwave/MindSet) - output from Thinkgear Socket Protocol

Shell 1.61% Java 98.39%

fork_processing-brain-grapher's Introduction

# Author: Eric Blue
#  url   = http://eric-blue.com/2011/07/13/neurosky-brainwave-visualizer/
#  email = ericblue76 (at) gmail (dot) com
# Project: Neurosky Brainwave Visualizer

[Overview]

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' (http://frontiernerds.com/brain-hack), 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
(http://developer.neurosky.com/docs/doku.php?id=thinkgear_connector_tgc).

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 127.0.0.1:13854)
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:

	{
	"eSense":
		{"attention":91,"meditation":41},
	 "eegPower":
	 	{"delta":1105014,"theta":211310,
	 	"lowAlpha":7730,"highAlpha":68568,
	 	"lowBeta":12949,"highBeta":47455,
	 	"lowGamma":55770,"highGamma":28247},
	 "poorSignalLevel":0
	 }
	 
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 (http://www.dlcsistemas.com/html/relay_tcp.html)
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 http://www.sojamo.de/libraries/controlP5/)
- JSON (See http://www.blprnt.com/processing/json.zip)

Make sure to unzip and include under your normal 'sketchbook' libraries folder.  Example directory structure:

	/usr/local/processing/libraries/
	|-- controlP5
	|   `-- library
	|       `-- controlP5.jar
	|-- json
	|   `-- library
	|       `-- json.jar


[Binaries]

Binaries were created using Processing's app builder (platforms = windows, mac & linux)

[Todo]
- Re-visit previous todo from original code
- Add ability to record data (CSV, etc.)

[Credits]

This code was inspired by the 'How to Hack Toy EEGs' article and forked from 
kitschpatrol (https://github.com/kitschpatrol/Processing-Brain-Grapher).
- Original Processing code from
	Eric Mika, Arturo Vidich and Sofy Yuditskaya (http://frontiernerds.com)
- Integration with Neurosky Thinkgear Socket Protocol from
    Eric Blue (http://eric-blue.com)

fork_processing-brain-grapher's People

Contributors

kitschpatrol avatar ericblue avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.