From 7989236dc1789900cae11f8c5896828b263d7219 Mon Sep 17 00:00:00 2001 From: Matt Ward Date: Sun, 4 May 2014 18:26:28 -0700 Subject: [PATCH] back to localhost --- README.md | 5 ++- htdocs/index.html | 111 ++++++++++++++++++++++++++++++++++++++++++++-- package.json | 31 +++++++++++++ socket_server.js | 2 +- 4 files changed, 142 insertions(+), 7 deletions(-) create mode 100644 package.json diff --git a/README.md b/README.md index ebd841d..ebc5e16 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,12 @@ Running the Server - Plugin the board - `python udp_server.py --json` - Optionally use `python udp_client.py --json` to verify data is coming through -- Make sure you have socket.io (or run `npm install socket.io`) +- Run `npm install` to make sure you have the dependencies - Run `node socket_server.js` -- Visit [http://localhost:8880](http://localhost:8880) to see your brain waves +- Visit [http://127.0.0.1:8880](http://127.0.0.1:8880) to see your brain waves - Optionally use `python socket_client.py` to view the Web Socket data coming back into Python (requires socketio-client) +Running the Python server/client without the --json flag will cause the OpenBCISample object to be used as the data transmission mechanism. This is for people that want to do some processing in Python. Dependency List -------------- diff --git a/htdocs/index.html b/htdocs/index.html index 66b5a99..2ba7df7 100644 --- a/htdocs/index.html +++ b/htdocs/index.html @@ -1,7 +1,110 @@ + + + + + diff --git a/package.json b/package.json new file mode 100644 index 0000000..4744dd2 --- /dev/null +++ b/package.json @@ -0,0 +1,31 @@ +{ + "name": "openbci", + "version": "0.0.1", + "description": "A Python and Node.js warpper around OpenBCI", + "main": "socket_server.js", + "dependencies": { + "socket.io": "^0.9.16", + "node-static": "^0.7.3" + }, + "devDependencies": { + "socket.io": "0.9.16" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://github.com/theRealWardo/Python_OpenBCI.git" + }, + "keywords": [ + "OpenBCI", + "brain", + "EEG" + ], + "author": "Matt Ward", + "license": "ISC", + "bugs": { + "url": "https://github.com/theRealWardo/Python_OpenBCI/issues" + }, + "homepage": "https://github.com/theRealWardo/Python_OpenBCI" +} diff --git a/socket_server.js b/socket_server.js index 4b49b38..363c5f4 100644 --- a/socket_server.js +++ b/socket_server.js @@ -6,7 +6,7 @@ var io = require('socket.io'); var UDP_HOST = '127.0.0.1', UDP_PORT = 8888, - SERVER_HOST = '10.0.1.194', + SERVER_HOST = '127.0.0.1', SERVER_PORT = 8880, HTDOCS_PATH = '/htdocs';