2
2
[ ![ Build Status] ( https://travis-ci.org/OpenBCI/OpenBCI_NodeJS_Ganglion.svg?branch=master )] ( https://travis-ci.org/OpenBCI/OpenBCI_NodeJS_Ganglion )
3
3
[ ![ codecov] ( https://codecov.io/gh/OpenBCI/OpenBCI_NodeJS_Ganglion/branch/master/graph/badge.svg )] ( https://codecov.io/gh/OpenBCI/OpenBCI_NodeJS_Ganglion )
4
4
[ ![ Dependency Status] ( https://david-dm.org/OpenBCI/OpenBCI_NodeJS_Ganglion.svg )] ( https://david-dm.org/OpenBCI/OpenBCI_NodeJS_Ganglion )
5
- [ ![ npm] ( https://img.shields.io/npm/dm/openbci- ganglion.svg?maxAge=2592000 )] ( http://npmjs.com/package/openbci- ganglion )
5
+ [ ![ npm] ( https://img.shields.io/npm/dm/@ openbci/ ganglion.svg?maxAge=2592000 )] ( http://npmjs.com/package/@ openbci/ ganglion )
6
6
7
7
# OpenBCI Node.js Ganglion SDK
8
8
@@ -35,7 +35,7 @@ The purpose of this module is to **get connected** and **start streaming** as fa
35
35
Get connected and start streaming right now
36
36
37
37
``` js
38
- const Ganglion = require (" openbci- ganglion" );
38
+ const Ganglion = require (" @ openbci/ ganglion" );
39
39
const ganglion = new Ganglion ();
40
40
ganglion .once (" ganglionFound" , peripheral => {
41
41
// Stop searching for BLE devices once a ganglion is found.
@@ -122,14 +122,14 @@ Check out the [**_automatic_** tests](https://codecov.io/gh/OpenBCI/OpenBCI_Node
122
122
Initializing the board:
123
123
124
124
``` js
125
- const Ganglion = require (" openbci- ganglion" );
125
+ const Ganglion = require (" @ openbci/ ganglion" );
126
126
const ganglion = new Ganglion ();
127
127
```
128
128
129
129
For initializing with options, such as verbose print outs:
130
130
131
131
``` js
132
- const Ganglion = require (" openbci- ganglion" );
132
+ const Ganglion = require (" @ openbci/ ganglion" );
133
133
const ourBoard = new Ganglion ({
134
134
verbose: true
135
135
});
@@ -138,7 +138,7 @@ const ourBoard = new Ganglion({
138
138
For initializing with callback, such as to catch errors on ` noble ` startup:
139
139
140
140
``` js
141
- const Ganglion = require (" openbci- ganglion" );
141
+ const Ganglion = require (" @ openbci/ ganglion" );
142
142
const ourBoard = new Ganglion (error => {
143
143
if (error) {
144
144
console .log (" error" , error);
@@ -151,7 +151,7 @@ const ourBoard = new Ganglion(error => {
151
151
For initializing with options and callback, such as verbose and to catch errors on ` noble ` startup:
152
152
153
153
``` js
154
- const Ganglion = require (" openbci- ganglion" );
154
+ const Ganglion = require (" @ openbci/ ganglion" );
155
155
const ourBoard = new Ganglion (
156
156
{
157
157
verbose: true
@@ -172,7 +172,7 @@ You MUST wait for the 'ready' event to be emitted before streaming/talking with
172
172
so installing the 'sample' listener and writing before the ready event might result in... nothing at all.
173
173
174
174
``` js
175
- const Ganglion = require (" openbci- ganglion" );
175
+ const Ganglion = require (" @ openbci/ ganglion" );
176
176
const ourBoard = new Ganglion ();
177
177
ourBoard
178
178
.connect (portName)
@@ -203,7 +203,7 @@ The power of this module is in using the sample emitter, to be provided with sam
203
203
4 . Install the [ 'sample'] ( #event-sample ) event emitter
204
204
205
205
``` js
206
- const Ganglion = require (" openbci- ganglion" );
206
+ const Ganglion = require (" @ openbci/ ganglion" );
207
207
const ourBoard = new Ganglion ();
208
208
ourBoard
209
209
.connect (localName)
@@ -223,7 +223,7 @@ ourBoard
223
223
Close the connection with [ ` .streamStop() ` ] ( #method-stream-stop ) and disconnect with [ ` .disconnect() ` ] ( #method-disconnect )
224
224
225
225
``` js
226
- const Ganglion = require (" openbci- ganglion" );
226
+ const Ganglion = require (" @ openbci/ ganglion" );
227
227
const ourBoard = new Ganglion ();
228
228
ourBoard .streamStop ().then (ourBoard .disconnect ());
229
229
```
0 commit comments